Skip to content

Commit

Permalink
ajuste header
Browse files Browse the repository at this point in the history
  • Loading branch information
yaskisoba committed Dec 13, 2023
1 parent 86b17fc commit c1fa1c8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import GlobalStyle from "./styles/global";
const App = () => (
<AuthProvider>
<RoutesApp />
<GlobalStyle />
{/* <GlobalStyle /> */}
</AuthProvider>
);

Expand Down
13 changes: 12 additions & 1 deletion frontend/src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -42,9 +46,16 @@ const Header = () => {
color="white"
>
<Box maxWidth={'16vh'} maxHeight={'16vh'} paddingLeft='3vh'>
<Link to="/Home">
{typeUser === 'true' ? (
<Link to="/home">
<Image src={cmtnLogo} alt='student' style={{ maxWidth: '100%', height: 'auto' }} />
</Link>
): (
<Link to="/home-student">
<Image src={cmtnLogo} alt='student' style={{ maxWidth: '100%', height: 'auto' }} />
</Link>
)}

</Box>
<Spacer />
<Box maxWidth={'5vh'} maxHeight={'2vh'} marginTop={'-0.5px'} marginBottom={'3vh'} >
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ const Home = () => {
</Button>
</HStack>
</Center>

<Center>
<HStack marginTop='2vh'>
<Button colorScheme='facebook'>
<Link to='/cadastrar-estudantes'>Importar estudantes</Link>
</Button>
</HStack>
</Center>
</Container>
<Footer />
</Flex>
Expand Down

0 comments on commit c1fa1c8

Please sign in to comment.