refactoring and cleaning
This commit is contained in:
parent
16f4f2297d
commit
ecc7777992
|
|
@ -1,10 +1,9 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Nav from "../components/ui/Nav";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
|
||||||
import { motion } from "framer-motion";
|
|
||||||
import { useUser } from "../hooks/useUser";
|
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 lhoistEmployee from "../assets/img/profiles/lhoist-employee.svg";
|
||||||
import subcontractorEmployee from "../assets/img/profiles/subcontractor-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 civilian from "../assets/img/profiles/civilian.svg";
|
||||||
import Loading from "../components/animations/Loading.jsx";
|
import Loading from "../components/animations/Loading.jsx";
|
||||||
|
|
||||||
import AnimatedPage from "../components/AnimatedPage";
|
|
||||||
export default function Profile() {
|
export default function Profile() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
const { profile, changeProfile } = useUser();
|
const { profile, changeProfile } = useUser();
|
||||||
|
|
||||||
const { language, screensTranslations } = useUser();
|
const { screensTranslations } = useUser();
|
||||||
|
|
||||||
if (!screensTranslations || !screensTranslations.profile) return <Loading />;
|
if (!screensTranslations || !screensTranslations.profile) return <Loading />;
|
||||||
const currentScreenTranslations = screensTranslations.profile;
|
const currentScreenTranslations = screensTranslations.profile;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user