forked from Synthetixio/trading-leaderboard
-
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.
- Loading branch information
1 parent
13e17f7
commit ab90420
Showing
8 changed files
with
121 additions
and
151 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.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Flex } from '@chakra-ui/layout'; | ||
|
||
export default function Footer() { | ||
// Add simple version of footer | ||
return <Flex as="footer"></Flex>; | ||
} |
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,33 @@ | ||
import { Button } from '@chakra-ui/button'; | ||
import { Flex } from '@chakra-ui/layout'; | ||
import { Image } from '@chakra-ui/image'; | ||
import { Flex, Text } from '@chakra-ui/layout'; | ||
import { Link, useLocation } from 'react-router-dom'; | ||
|
||
export default function Header() { | ||
const location = useLocation(); | ||
return ( | ||
<Flex justifyContent="center" my="4"> | ||
{location.pathname.includes('leaderboard') && ( | ||
<Link to="/rules"> | ||
<Button variant="outline">Rules</Button> | ||
</Link> | ||
)} | ||
{location.pathname.includes('rules') && ( | ||
<Link to="/leaderboard"> | ||
<Button variant="outline">Leaderboard</Button> | ||
</Link> | ||
)} | ||
<Flex gap="4" my="4" as="header" px="4"> | ||
<Link to="/"> | ||
<Image src="/header.png" cursor="pointer" /> | ||
</Link> | ||
<Link to="/"> | ||
<Text | ||
fontWeight={700} | ||
color={location.pathname.length === 1 ? 'white' : 'gray.500'} | ||
> | ||
Rules | ||
</Text> | ||
</Link> | ||
|
||
<Link to="/leaderboard"> | ||
<Text | ||
fontWeight={700} | ||
color={ | ||
location.pathname.includes('leaderboard') ? 'white' : 'gray.500' | ||
} | ||
> | ||
Leaderboard | ||
</Text> | ||
</Link> | ||
</Flex> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"rewrites": [{ "source": "/(.*)", "destination": "/" }] | ||
} |