diff --git a/app/component/AlertMsg.js b/app/component/AlertMsg.js
deleted file mode 100644
index 731fe08..0000000
--- a/app/component/AlertMsg.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use client";
-
-import { Alert, Snackbar } from "@mui/material";
-import { useState } from "react";
-
-function AlertMsg() {
- const [open, setOpen] = useState(true);
-
- const handleClick = () => {
- setOpen(true);
- };
-
- const handleClose = (event, reason) => {
- if (reason === "clickaway") {
- return;
- }
-
- setOpen(false);
- };
-
- return (
-
-
- This is a success Alert inside a Snackbar!
-
-
- );
-}
-
-export default AlertMsg;
diff --git a/app/component/uploadFile/Crop.js b/app/component/uploadFile/Crop.js
new file mode 100644
index 0000000..ccda35f
--- /dev/null
+++ b/app/component/uploadFile/Crop.js
@@ -0,0 +1,51 @@
+import { Button } from "@mui/material";
+import { useState } from "react";
+import Cropper from "react-easy-crop";
+import { cropImage } from "./cropImg";
+
+function Crop({ data, uploadImg, handleClose }) {
+ const [crop, setCrop] = useState({ x: 0, y: 0 });
+ const [zoom, setZoom] = useState(1);
+ const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
+
+ const onComplete = (imagePromisse) =>
+ imagePromisse.then((image) => uploadImg(image));
+
+ return (
+
diff --git a/components/panel/userAccount/account/Head.js b/components/panel/userAccount/account/Head.js
index 4f7dc12..a299448 100644
--- a/components/panel/userAccount/account/Head.js
+++ b/components/panel/userAccount/account/Head.js
@@ -1,13 +1,10 @@
"use client";
-import UploadFile from "@/app/component/UploadFile";
+import UploadFile from "@/app/component/uploadFile";
import { useState } from "react";
function Head() {
- const [image, setImage] = useState({
- file: "",
- blob: "",
- });
+ const [image, setImage] = useState("");
return (
diff --git a/mui/index.js b/mui/index.js
index 8720be6..ed63d90 100644
--- a/mui/index.js
+++ b/mui/index.js
@@ -4,6 +4,7 @@ export const styleDefault = {
left: "50%",
transform: "translate(-50%, -50%)",
width: "fit-content",
+ outline: "none",
bgcolor: "#FFF",
borderRadius: 2,
p: 2,
diff --git a/package-lock.json b/package-lock.json
index b741aac..e7e1607 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,7 +28,9 @@
"npm": "^10.8.2",
"react": "^18.0.0",
"react-dom": "^18",
+ "react-easy-crop": "^5.1.0",
"react-google-map-picker": "^1.2.3",
+ "react-images-uploading": "^3.1.7",
"styled-components": "^6.1.11",
"stylis": "^4.3.4",
"stylis-plugin-rtl": "^2.1.1",
@@ -14694,6 +14696,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/normalize-wheel": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+ "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+ },
"node_modules/npm": {
"version": "10.8.2",
"resolved": "https://registry.npmjs.org/npm/-/npm-10.8.2.tgz",
@@ -19346,6 +19353,19 @@
"react": "^18.3.1"
}
},
+ "node_modules/react-easy-crop": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/react-easy-crop/-/react-easy-crop-5.1.0.tgz",
+ "integrity": "sha512-UsYeF/N7zoqtfOSD+2xSt1nRaoBYCI2YLkzmq+hi+aVepS4/bAMhbrLwJtDAP60jsVzWRiQCX7JG+ZtfWcHsiw==",
+ "dependencies": {
+ "normalize-wheel": "^1.0.1",
+ "tslib": "^2.0.1"
+ },
+ "peerDependencies": {
+ "react": ">=16.4.0",
+ "react-dom": ">=16.4.0"
+ }
+ },
"node_modules/react-error-boundary": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-3.1.4.tgz",
@@ -19377,6 +19397,19 @@
"react": "^17.0.0"
}
},
+ "node_modules/react-images-uploading": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/react-images-uploading/-/react-images-uploading-3.1.7.tgz",
+ "integrity": "sha512-woET50eCezm645iIeP4gCoN7HjdR3T64UXC5l53yd+2vHFp+pwABH8Z/aAO5IXDeC1aP6doQ+K738L701zswAw==",
+ "engines": {
+ "node": ">=8",
+ "npm": ">=5"
+ },
+ "peerDependencies": {
+ "react": ">=16.8.0",
+ "react-dom": ">=16.8.0"
+ }
+ },
"node_modules/react-is": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
diff --git a/package.json b/package.json
index c936ffb..f09b639 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,9 @@
"npm": "^10.8.2",
"react": "^18.0.0",
"react-dom": "^18",
+ "react-easy-crop": "^5.1.0",
"react-google-map-picker": "^1.2.3",
+ "react-images-uploading": "^3.1.7",
"styled-components": "^6.1.11",
"stylis": "^4.3.4",
"stylis-plugin-rtl": "^2.1.1",