-
Notifications
You must be signed in to change notification settings - Fork 0
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 #60 from penguinsufcg/feat/edit-screen
Add logout feature
- Loading branch information
Showing
4 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
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
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,18 +1,20 @@ | ||
import useSession from "@/hooks/useSession" | ||
import { Flex } from "@chakra-ui/react" | ||
import React from "react" | ||
import { BiHome, BiCartAlt, BiReceipt } from "react-icons/bi" | ||
import NavbarOption from "./components/NavbarOption" | ||
import useSession from '@/hooks/useSession' | ||
import { Flex } from '@chakra-ui/react' | ||
import React from 'react' | ||
import { BiHome, BiCartAlt, BiReceipt, BiLogOut } from 'react-icons/bi' | ||
import NavbarOption from './components/NavbarOption' | ||
|
||
const Navbar = () => { | ||
const { underPayment } = useSession() | ||
const { logout, underPayment } = useSession() | ||
|
||
return ( | ||
<Flex justifyContent="space-around"> | ||
<NavbarOption isSelected icon={<BiHome size={24} />} href="/" /> | ||
<NavbarOption icon={<BiCartAlt size={24} />} href="/cart" /> | ||
<NavbarOption icon={<BiReceipt size={24} />} href={underPayment ? "/bill" : "/receipt"} /> | ||
<NavbarOption icon={<BiLogOut size={24} />} href="/" onClick={logout} /> | ||
</Flex> | ||
) | ||
} | ||
|
||
export default Navbar | ||
export default Navbar |
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