diff --git a/frontend-plataforma-tutoriais/.gitignore b/frontend-plataforma-tutoriais/.gitignore index a547bf3..a0377b4 100644 --- a/frontend-plataforma-tutoriais/.gitignore +++ b/frontend-plataforma-tutoriais/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist dist-ssr +.env *.local # Editor directories and files diff --git a/frontend-plataforma-tutoriais/src/components/header/index.tsx b/frontend-plataforma-tutoriais/src/components/header/index.tsx index a8211e7..e95d431 100644 --- a/frontend-plataforma-tutoriais/src/components/header/index.tsx +++ b/frontend-plataforma-tutoriais/src/components/header/index.tsx @@ -1,3 +1,4 @@ +import API_URL from "../../config/api"; import styles from "./styles.module.css"; import { LuUser, LuMenu, LuSearch, LuLogOut, LuUsers, LuMail, LuGraduationCap, LuTvMinimalPlay, LuLayoutDashboard, LuCircleUser, LuPanelLeftClose, LuClock3, LuCalendar } from "react-icons/lu"; import { useEffect, useState } from "react"; @@ -13,7 +14,8 @@ import { PiCheckCircleFill } from "react-icons/pi"; import { useGetWorkshopsSearch } from "../../hooks/useGetWorkshopsSearch"; import { imageSkeletonFadeStyle, onImageSkeletonLoad } from "../../utils/imageSkeleton"; import { motion, AnimatePresence } from "framer-motion"; -import { useGetCurrentUser } from "../../hooks/useGetCurrentUser"; +/* import { useGetCurrentUser } from "../../hooks/useGetCurrentUser"; */ + export default function Header() { const [showMenu, setShowMenu] = useState(false); @@ -28,7 +30,7 @@ export default function Header() { const { getVideos } = useGetVideos(); const { getVideosSearch } = useGetVideosSearch(); const { getWorkshopsSearch } = useGetWorkshopsSearch(); - const { getCurrentUser } = useGetCurrentUser(); + /* const { getCurrentUser } = useGetCurrentUser(); */ const [role, setRole] = useState(0); const [videosWatched, setVideosWatched] = useState(0); const [videosCount, setVideosCount] = useState(0); @@ -41,8 +43,8 @@ export default function Header() { setVideosWatched(videosWatched ? parseInt(videosWatched) : 0); const videosCount = localStorage.getItem("videosCount"); setVideosCount(videosCount ? parseInt(videosCount) : 0); - const userData = await getCurrentUser(); - setRole(userData.data.role_id); + /* const userData = await getCurrentUser(); + setRole(userData.data.role_id); */ }; fetchAll(); }, []); @@ -235,7 +237,7 @@ export default function Header() {