From 4f210d736b3b88c182e32db7b914b0a178782bd0 Mon Sep 17 00:00:00 2001 From: Suzy-cas Date: Tue, 16 Jan 2024 10:51:43 +0100 Subject: [PATCH 01/19] app form backend modif --- backend/src/app.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/src/app.js b/backend/src/app.js index 48acf68..dd85b9d 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -1,5 +1,5 @@ // Load the express module to create a web application - +const path = require("path"); const express = require("express"); const app = express(); @@ -105,7 +105,7 @@ app.use("/api", router); // 1. Uncomment the lines related to serving static files and redirecting unhandled requests. // 2. Ensure that the `reactBuildPath` points to the correct directory where your frontend's build artifacts are located. -const reactBuildPath = `${__dirname}/../../frontend/dist`; +// const reactBuildPath = `${__dirname}/../../frontend/dist`; // Serve react resources @@ -117,8 +117,6 @@ const reactBuildPath = `${__dirname}/../../frontend/dist`; // res.sendFile(`${reactBuildPath}/index.html`); // }); -const path = require("path"); - app.use("*", (req, res) => { if (req.originalUrl.includes("assets")) { res.sendFile( From 99aaf6fa949adb4f9875c826de81ec181fe26d11 Mon Sep 17 00:00:00 2001 From: Suzy-cas Date: Tue, 16 Jan 2024 17:43:53 +0100 Subject: [PATCH 02/19] corrected argon2 import issue --- backend/src/controllers/authControllers.js | 9 +++------ backend/src/router.js | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/backend/src/controllers/authControllers.js b/backend/src/controllers/authControllers.js index b54d1ae..ac7d2b0 100644 --- a/backend/src/controllers/authControllers.js +++ b/backend/src/controllers/authControllers.js @@ -1,4 +1,4 @@ -const { hash, argon2 } = require("argon2"); +const { hash, verify, argon2id } = require("argon2"); const jwt = require("jsonwebtoken"); // Import access to database tables const tables = require("../tables"); @@ -9,7 +9,7 @@ const add = (req, res) => { // We create our hashing options const hashingOptions = { - type: argon2.argon2id, + type: argon2id, memoryCost: 2 ** 16, timeCost: 5, parallelism: 1, @@ -45,10 +45,7 @@ const login = async (req, res, next) => { return; } - const verified = await argon2.verify( - user.hashed_password, - req.body.password - ); + const verified = await verify(user.hashed_password, req.body.password); if (verified) { // Respond with the user in JSON format (but without the hashed password) diff --git a/backend/src/router.js b/backend/src/router.js index 0497e63..794744e 100644 --- a/backend/src/router.js +++ b/backend/src/router.js @@ -3,11 +3,11 @@ const express = require("express"); const router = express.Router(); const authControllers = require("./controllers/authControllers"); -const { checkDatas } = require("./services/validateLogin"); +// const { checkDatas } = require("./services/validateLogin"); const userControllers = require("./controllers/userControllers"); const { validateUser } = require("./services/validateUser"); -const { verifyToken, hashPassword } = require("./services/auth"); +const { hashPassword } = require("./services/auth"); const artworksControllers = require("./controllers/artworkControllers"); const { validateArtwork } = require("./services/validateArtwork"); @@ -24,7 +24,7 @@ const { validateCapture } = require("./services/validateCapture"); // Authentification routes router.post("/register", authControllers.add); -router.post("/login", checkDatas, verifyToken, authControllers.login); +router.post("/login", authControllers.login); // Routes of users router.get("/users", userControllers.browse); From 020d192a2f2acdb85098d6f6546e0c206de6967c Mon Sep 17 00:00:00 2001 From: Alexis-NM Date: Tue, 16 Jan 2024 19:05:47 +0100 Subject: [PATCH 03/19] Upload Photo Front --- frontend/package-lock.json | 81 +++++++++++++++++++++++++-- frontend/package.json | 2 + frontend/src/assets/Upload.svg | 2 + frontend/src/components/Camera.jsx | 23 ++++++++ frontend/src/components/DropZone.jsx | 48 ++++++++++++++++ frontend/src/components/DropZone.scss | 9 +++ frontend/src/pages/Map.jsx | 2 + 7 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 frontend/src/assets/Upload.svg create mode 100644 frontend/src/components/Camera.jsx create mode 100644 frontend/src/components/DropZone.jsx create mode 100644 frontend/src/components/DropZone.scss diff --git a/frontend/package-lock.json b/frontend/package-lock.json index cb8014f..7f31169 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -12,8 +12,10 @@ "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-dropzone": "^14.2.3", "react-leaflet": "^4.2.1", "react-router-dom": "^6.14.2", + "react-webcam": "^7.2.0", "sass": "^1.69.7" }, "devDependencies": { @@ -1274,6 +1276,14 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/attr-accept": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", + "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==", + "engines": { + "node": ">=4" + } + }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -2501,6 +2511,17 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-selector": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", + "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4063,6 +4084,22 @@ "react": "^18.2.0" } }, + "node_modules/react-dropzone": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", + "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", + "dependencies": { + "attr-accept": "^2.2.2", + "file-selector": "^0.6.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">= 10.13" + }, + "peerDependencies": { + "react": ">= 16.8 || 18.0.0" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -4120,6 +4157,15 @@ "react-dom": ">=16.8" } }, + "node_modules/react-webcam": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.2.0.tgz", + "integrity": "sha512-xkrzYPqa1ag2DP+2Q/kLKBmCIfEx49bVdgCCCcZf88oF+0NPEbkwYk3/s/C7Zy0mhM8k+hpdNkBLzxg8H0aWcg==", + "peerDependencies": { + "react": ">=16.2.0", + "react-dom": ">=16.2.0" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4726,8 +4772,7 @@ "node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-check": { "version": "0.4.0", @@ -5877,6 +5922,11 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "attr-accept": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.2.2.tgz", + "integrity": "sha512-7prDjvt9HmqiZ0cl5CRjtS84sEyhsHP2coDkaZKRKVfCDo9s7iw7ChVmar78Gu9pC4SoR/28wFu/G5JJhTnqEg==" + }, "available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", @@ -6785,6 +6835,14 @@ "flat-cache": "^3.0.4" } }, + "file-selector": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.6.0.tgz", + "integrity": "sha512-QlZ5yJC0VxHxQQsQhXvBaC7VRJ2uaxTf+Tfpu4Z/OcVQJVpZO+DGU0rkoVW5ce2SccxugvpBJoMvUs59iILYdw==", + "requires": { + "tslib": "^2.4.0" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7852,6 +7910,16 @@ "scheduler": "^0.23.0" } }, + "react-dropzone": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-14.2.3.tgz", + "integrity": "sha512-O3om8I+PkFKbxCukfIR3QAGftYXDZfOE2N1mr/7qebQJHs7U+/RSL/9xomJNpRg9kM5h9soQSdf0Gc7OHF5Fug==", + "requires": { + "attr-accept": "^2.2.2", + "file-selector": "^0.6.0", + "prop-types": "^15.8.1" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -7888,6 +7956,12 @@ "react-router": "6.20.0" } }, + "react-webcam": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.2.0.tgz", + "integrity": "sha512-xkrzYPqa1ag2DP+2Q/kLKBmCIfEx49bVdgCCCcZf88oF+0NPEbkwYk3/s/C7Zy0mhM8k+hpdNkBLzxg8H0aWcg==", + "requires": {} + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -8308,8 +8382,7 @@ "tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-check": { "version": "0.4.0", diff --git a/frontend/package.json b/frontend/package.json index 47ff050..4dc6efd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,8 +12,10 @@ "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-dropzone": "^14.2.3", "react-leaflet": "^4.2.1", "react-router-dom": "^6.14.2", + "react-webcam": "^7.2.0", "sass": "^1.69.7" }, "devDependencies": { diff --git a/frontend/src/assets/Upload.svg b/frontend/src/assets/Upload.svg new file mode 100644 index 0000000..606312e --- /dev/null +++ b/frontend/src/assets/Upload.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/frontend/src/components/Camera.jsx b/frontend/src/components/Camera.jsx new file mode 100644 index 0000000..7567d2d --- /dev/null +++ b/frontend/src/components/Camera.jsx @@ -0,0 +1,23 @@ +import React, { useRef, useCallback } from "react"; +import Webcam from "react-webcam"; + +function Camera() { + const webcamRef = useRef(null); + + const capture = useCallback(() => { + const imageSrc = webcamRef.current.getScreenshot(); + // Faites quelque chose avec l'image capturée, par exemple, affichez-la ou téléchargez-la. + console.info(imageSrc); + }, [webcamRef]); + + return ( +
+ + +
+ ); +} + +export default Camera; diff --git a/frontend/src/components/DropZone.jsx b/frontend/src/components/DropZone.jsx new file mode 100644 index 0000000..154c682 --- /dev/null +++ b/frontend/src/components/DropZone.jsx @@ -0,0 +1,48 @@ +import { useDropzone } from "react-dropzone"; +import axios from "axios"; +import Upload from "../assets/Upload.svg"; + +import "./DropZone.scss"; + +function DropZone() { + const onDrop = async (acceptedFiles) => { + const file = acceptedFiles[0]; + + // Créez un objet FormData pour envoyer le fichier au serveur + const formData = new FormData(); + formData.append("picture", file); + + try { + // Envoyez le fichier au serveur + const response = await axios.post("URL_DU_ENDPOINT_API", formData, { + headers: { + "Content-Type": "multipart/form-data", + }, + }); + + // Faites quelque chose avec la réponse du serveur si nécessaire + console.info(response.data); + } catch (error) { + // Gérez les erreurs d'envoi + console.error("Erreur lors de l'envoi du fichier", error); + } + }; + + const { getRootProps, getInputProps } = useDropzone({ onDrop }); + return ( +
+ + Upload icon +

Télécharger ma photo

+
+ ); +} + +export default DropZone; diff --git a/frontend/src/components/DropZone.scss b/frontend/src/components/DropZone.scss new file mode 100644 index 0000000..1296687 --- /dev/null +++ b/frontend/src/components/DropZone.scss @@ -0,0 +1,9 @@ +@import "../styles/commons.scss"; + +.Upload-Icon { + width: 4rem; + background-color: $yellow; + border-radius: 45%; + padding: 0.4rem; + margin-top: 1rem; +} diff --git a/frontend/src/pages/Map.jsx b/frontend/src/pages/Map.jsx index 50c1c94..618730c 100644 --- a/frontend/src/pages/Map.jsx +++ b/frontend/src/pages/Map.jsx @@ -10,6 +10,7 @@ import "./Map.scss"; import MarkerSVG from "../assets/Map-Pin.svg"; import MapForm from "../components/MapForm"; import InfoStreetArt from "../components/InfoStreetArt"; +import DropZone from "../components/DropZone"; function Map() { const ZOOM_LEVEL = 11; @@ -222,6 +223,7 @@ function Map() { ))} + )} From 638e0ce42a4e5f7f1be7401e6a6a9dd09229f597 Mon Sep 17 00:00:00 2001 From: Alexandre-27 Date: Tue, 16 Jan 2024 22:10:32 +0100 Subject: [PATCH 04/19] Creation of a state userIndex which is worth 0 with a constant userCurrent which is equal to a .slice() method which is applied on the users and in which we add userIndex + 6. Creation of 2 anonymous functions nextUsersSlide and prevUsersSlide in which there has the setUserIndex with which we use to calculate the number of elements in the users table to stop browsing it when we find ourselves at its limit. Creation of 2 buttons which disappear from the rendering when the carousel limit is reached. --- frontend/src/pages/Admin.jsx | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Admin.jsx b/frontend/src/pages/Admin.jsx index d6e6bea..07e7b13 100644 --- a/frontend/src/pages/Admin.jsx +++ b/frontend/src/pages/Admin.jsx @@ -17,6 +17,7 @@ function admin() { const [activeSection, setActiveSection] = useState("dashboard"); const [activeComponent, setActiveComponent] = useState("captures"); const [users, setUsers] = useState([]); + const [userIndex, setUserIndex] = useState(0); const dashboardRef = useRef(null); const usersRef = useRef(null); const streetArtRef = useRef(null); @@ -76,6 +77,16 @@ function admin() { }); }, []); + const userCurrent = users.slice(userIndex, userIndex + 6); + + const nextUsersSlide = () => { + setUserIndex((index) => Math.min(index + 1, users.length)); + }; + + const prevUsersSlide = () => { + setUserIndex((index) => Math.max(index - 1, 0)); + }; + return (
{isMobile ? ( @@ -114,7 +125,7 @@ function admin() {
- {users.map((user) => ( + {userCurrent.map((user) => (
avatar du profil ))}
+ {userIndex > 0 && ( + + )} + {userIndex < users.length - 1 && ( + + )}

From e2eecf867b25a669185c56559197df72087acfe4 Mon Sep 17 00:00:00 2001 From: Alexandre-27 Date: Tue, 16 Jan 2024 22:44:42 +0100 Subject: [PATCH 05/19] Setting up css in the buttons of the Admin.jsx file in the usersRef section --- frontend/src/pages/Admin.jsx | 46 ++++++++++++++++++----------------- frontend/src/pages/Admin.scss | 7 ++++++ 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/frontend/src/pages/Admin.jsx b/frontend/src/pages/Admin.jsx index 07e7b13..0cec006 100644 --- a/frontend/src/pages/Admin.jsx +++ b/frontend/src/pages/Admin.jsx @@ -23,8 +23,6 @@ function admin() { const streetArtRef = useRef(null); const artistsRef = useRef(null); - console.info(users); - useEffect(() => { const handleScroll = () => { const offset = window.scrollY; @@ -155,26 +153,30 @@ function admin() {

))} - {userIndex > 0 && ( - - )} - {userIndex < users.length - 1 && ( - - )} +
+ {userIndex > 0 && ( + + )} + {userIndex < users.length - 1 && ( + + )} +

diff --git a/frontend/src/pages/Admin.scss b/frontend/src/pages/Admin.scss index 559f3e2..681a539 100644 --- a/frontend/src/pages/Admin.scss +++ b/frontend/src/pages/Admin.scss @@ -152,6 +152,13 @@ } } +.uti-btn { + margin-top: 3%; + display: flex; + justify-content: center; + gap: 8%; +} + .sa-grid { display: grid; grid-template-columns: repeat(3, 1fr); From 20031913270b057826e1c905d06dbc458a05646c Mon Sep 17 00:00:00 2001 From: Alexandre-27 Date: Wed, 17 Jan 2024 00:23:14 +0100 Subject: [PATCH 06/19] Implementation of functions which allows you to calculate the number of slides there are in the carousel, this number is defined by the number of users registered on the site. The function also allows you to know which slide the admin is on. --- frontend/src/pages/Admin.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/src/pages/Admin.jsx b/frontend/src/pages/Admin.jsx index 0cec006..f971036 100644 --- a/frontend/src/pages/Admin.jsx +++ b/frontend/src/pages/Admin.jsx @@ -18,6 +18,8 @@ function admin() { const [activeComponent, setActiveComponent] = useState("captures"); const [users, setUsers] = useState([]); const [userIndex, setUserIndex] = useState(0); + const [userSlideResult, setUserSlideResult] = useState(0); + const [currentSlide, setCurrentSlide] = useState(1); const dashboardRef = useRef(null); const usersRef = useRef(null); const streetArtRef = useRef(null); @@ -66,6 +68,7 @@ function admin() { (user) => !user.is_administrator ); setUsers(usersPlayer); + setUserSlideResult(Math.ceil(usersPlayer.length)); }) .catch((error) => { console.error( @@ -85,6 +88,14 @@ function admin() { setUserIndex((index) => Math.max(index - 1, 0)); }; + const nextCurrentSlide = () => { + setCurrentSlide((index) => Math.min(index + 1)); + }; + + const prevCurrentSlide = () => { + setCurrentSlide((index) => Math.max(index - 1)); + }; + return (
{isMobile ? ( @@ -160,17 +171,22 @@ function admin() { className="button-red" onClick={() => { prevUsersSlide(); + prevCurrentSlide(); }} > Précédent )} +

+ Pages : {currentSlide} / {userSlideResult} +

{userIndex < users.length - 1 && ( + {isCameraOpen ? ( +
+ + +
+ ) : ( +
+ +
+ )}
); } diff --git a/frontend/src/components/Camera.scss b/frontend/src/components/Camera.scss new file mode 100644 index 0000000..df0ab57 --- /dev/null +++ b/frontend/src/components/Camera.scss @@ -0,0 +1,17 @@ +@import "../styles/commons.scss"; + +.camera-button { + background: none; + border: none; + padding: 0; + margin: 0; + font: inherit; + cursor: pointer; + outline: inherit; +} + +.Camera-Icon { + width: 20vw; + margin-bottom: 30vh; + background-color: $deep-purple; +} diff --git a/frontend/src/pages/Map.jsx b/frontend/src/pages/Map.jsx index 50c1c94..956289a 100644 --- a/frontend/src/pages/Map.jsx +++ b/frontend/src/pages/Map.jsx @@ -10,6 +10,7 @@ import "./Map.scss"; import MarkerSVG from "../assets/Map-Pin.svg"; import MapForm from "../components/MapForm"; import InfoStreetArt from "../components/InfoStreetArt"; +import Camera from "../components/Camera"; function Map() { const ZOOM_LEVEL = 11; @@ -164,34 +165,37 @@ function Map() { return (
{isMobile ? ( - - - {markers.map((marker) => ( - handleMarkerClick(marker), - }} - > - - - - - ))} - + <> + + + {markers.map((marker) => ( + handleMarkerClick(marker), + }} + > + + + + + ))} + + + ) : ( <> Date: Tue, 23 Jan 2024 17:50:01 +0100 Subject: [PATCH 18/19] edited Profile --- frontend/src/components/Login.jsx | 8 ++------ frontend/src/main.jsx | 1 - frontend/src/pages/Profile.jsx | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/Login.jsx b/frontend/src/components/Login.jsx index 31f66ff..15ed147 100644 --- a/frontend/src/components/Login.jsx +++ b/frontend/src/components/Login.jsx @@ -13,8 +13,7 @@ function Login() { email: "", password: "", }); - // console.info(AuthContext); - // const connect = axios.create(import.meta.env.VITE_BACKEND_URL); + const navigate = useNavigate(); const handleLoginRegister = (event) => { @@ -35,10 +34,7 @@ function Login() { // Appel à l'API pour demander une connexion const res = await axios.post( `${import.meta.env.VITE_BACKEND_URL}/api/login`, - loginInfo, - { - withCredentials: true, - } + loginInfo ); await localStorage.setItem("token", res.data.token); await handleAuth(); diff --git a/frontend/src/main.jsx b/frontend/src/main.jsx index 2e22b0c..f1d4443 100644 --- a/frontend/src/main.jsx +++ b/frontend/src/main.jsx @@ -15,7 +15,6 @@ import Layout from "./pages/Layout"; import { AuthContextProvider } from "./context/AuthContext"; import Gallery from "./pages/Gallery"; - const router = createBrowserRouter([ { path: "/", diff --git a/frontend/src/pages/Profile.jsx b/frontend/src/pages/Profile.jsx index 783214c..112564d 100644 --- a/frontend/src/pages/Profile.jsx +++ b/frontend/src/pages/Profile.jsx @@ -3,13 +3,11 @@ import { AuthContext } from "../context/AuthContext"; function Profile() { const { user, handleAuth } = useContext(AuthContext); - + console.info(user); useEffect(() => { handleAuth(); }, []); - console.info(user); - return

Bienvenue sur la page profil!

; } From 0155bdd3900bc390522448cf6657448a5557f2a9 Mon Sep 17 00:00:00 2001 From: Suzy-cas Date: Tue, 23 Jan 2024 17:56:05 +0100 Subject: [PATCH 19/19] app linter correction --- backend/src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/app.js b/backend/src/app.js index f65d096..63a4375 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -1,5 +1,5 @@ // Load the express module to create a web application -const path = require("path"); +// const path = require("path"); const express = require("express"); const app = express();