-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from mdsreq-fga-unb/front-login-integrate
primeira versão do header e logout
- Loading branch information
Showing
5 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
import React from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import Button from "../../components/Button"; | ||
import useAuth from "../../hooks/useAuth"; | ||
import * as C from "./styles"; | ||
|
||
const Home = () => { | ||
const { signout } = useAuth(); | ||
const navigate = useNavigate(); | ||
import { Link } from "react-router-dom"; | ||
import { Flex, Box, Heading, Spacer, Text, Center, Menu, MenuButton, MenuList, MenuItem, Button} from "@chakra-ui/react"; // Importe os componentes do Chakra UI ou outro framework que você esteja usando | ||
import { Image } from '@chakra-ui/react' | ||
import cmtnLogo from '../../img/cmtnLogo.png' | ||
import menuHamburguer from '../../icon/menuHamburguer.png' | ||
|
||
const Header = () => { | ||
return ( | ||
<C.Container> | ||
<C.Title>Home</C.Title> | ||
<Button Text="Sair" onClick={() => [signout(), navigate("/")]}> | ||
Sair | ||
</Button> | ||
</C.Container> | ||
<Flex | ||
as="header" | ||
align="center" | ||
justify="space-between" | ||
padding="1rem" | ||
backgroundColor="#243A69" | ||
color="white" | ||
> | ||
<Box> | ||
<Heading as="h1" size="lg"> | ||
<Box maxWidth={'120px'} maxHeight={'120px'} paddingLeft='30px'> | ||
<Image src={cmtnLogo} alt='student' style={{ maxWidth: '100%', height: 'auto' }} /> | ||
</Box> | ||
</Heading> | ||
</Box> | ||
<Spacer /> | ||
<Box> | ||
<Link to="/">Home</Link> | ||
<Box maxWidth={'40px'} maxHeight={'40px'} marginTop={'-12px'} marginBottom={'3px'} > | ||
<Menu> | ||
<MenuButton border={'none'} bgColor={'#243A69'} > | ||
|
||
<Image src={menuHamburguer} alt='menuHamburguer' style={{ maxWidth: '100%', height: 'auto' }}/> | ||
</MenuButton> | ||
<MenuList > | ||
<MenuItem>Download</MenuItem> | ||
<MenuItem>Create a Copy</MenuItem> | ||
<MenuItem>Mark as Draft</MenuItem> | ||
<MenuItem>Delete</MenuItem> | ||
<MenuItem>Attend a Workshop</MenuItem> | ||
</MenuList> | ||
</Menu> | ||
</Box> | ||
</Box> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default Home; | ||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters