diff --git a/frontend/src/App.js b/frontend/src/App.js index 5054036e..e47c615a 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -6,7 +6,7 @@ import GlobalStyle from "./styles/global"; const App = () => ( - + {/* */} ); diff --git a/frontend/src/components/Header/index.js b/frontend/src/components/Header/index.js index 60356716..b167db76 100644 --- a/frontend/src/components/Header/index.js +++ b/frontend/src/components/Header/index.js @@ -11,11 +11,15 @@ import logoutIcon from '../../icon/sair-alt 1.png'; import { StyledMenuList, StyledImage, StyledMenuItem } from "./styles"; import { useNavigate } from "react-router-dom"; import axios from 'axios'; +import useAuth from "../../hooks/useAuth"; const Header = () => { + const { isSuperUser } = useAuth() const navigate = useNavigate(); const [showConfirmation, setShowConfirmation] = useState(false); + const typeUser = isSuperUser() + const handleLogout = async () => { const accessToken = sessionStorage.getItem("accessToken"); try { @@ -42,9 +46,16 @@ const Header = () => { color="white" > - + {typeUser === 'true' ? ( + + student + + ): ( + student + )} + diff --git a/frontend/src/pages/Home/index.js b/frontend/src/pages/Home/index.js index c3ffd2d2..4374c01e 100644 --- a/frontend/src/pages/Home/index.js +++ b/frontend/src/pages/Home/index.js @@ -56,6 +56,14 @@ const Home = () => { + +
+ + + +