diff options
Diffstat (limited to 'stepped-solutions/29/frontend/components/Nav.js')
| -rwxr-xr-x | stepped-solutions/29/frontend/components/Nav.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/stepped-solutions/29/frontend/components/Nav.js b/stepped-solutions/29/frontend/components/Nav.js new file mode 100755 index 0000000..12abde5 --- /dev/null +++ b/stepped-solutions/29/frontend/components/Nav.js @@ -0,0 +1,38 @@ +import Link from 'next/link'; +import NavStyles from './styles/NavStyles'; +import User from './User'; +import Signout from './Signout'; + +const Nav = () => ( + <User> + {({ data: { me } }) => ( + <NavStyles> + <Link href="/items"> + <a>Shop</a> + </Link> + {me && ( + <> + <Link href="/sell"> + <a>Sell</a> + </Link> + <Link href="/orders"> + <a>Orders</a> + </Link> + <Link href="/me"> + <a>Account</a> + </Link> + <Signout /> + </> + )} + {!me && ( + <Link href="/signup"> + <a>Sign In</a> + </Link> + + )} + </NavStyles> + )} + </User> +); + +export default Nav; |
