refactoring and cleaning

This commit is contained in:
Antoine M 2024-03-13 17:52:46 +01:00
parent 16f4f2297d
commit ecc7777992

View File

@ -1,10 +1,9 @@
import React from "react";
import Nav from "../components/ui/Nav";
import { useLocation, useNavigate } from "react-router-dom";
import { motion } from "framer-motion";
import { useNavigate } from "react-router-dom";
import { useUser } from "../hooks/useUser";
// import screensTranslations from "../data/screensTranslations.json";
import Nav from "../components/ui/Nav";
import AnimatedPage from "../components/AnimatedPage";
import lhoistEmployee from "../assets/img/profiles/lhoist-employee.svg";
import subcontractorEmployee from "../assets/img/profiles/subcontractor-employee.svg";
@ -12,14 +11,12 @@ import driver from "../assets/img/profiles/driver.svg";
import civilian from "../assets/img/profiles/civilian.svg";
import Loading from "../components/animations/Loading.jsx";
import AnimatedPage from "../components/AnimatedPage";
export default function Profile() {
const navigate = useNavigate();
const location = useLocation();
const { profile, changeProfile } = useUser();
const { language, screensTranslations } = useUser();
const { screensTranslations } = useUser();
if (!screensTranslations || !screensTranslations.profile) return <Loading />;
const currentScreenTranslations = screensTranslations.profile;