From 3065f07ba8f26c7ccfe440632655fb809dc3ac03 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 21 Aug 2018 12:16:26 -0400 Subject: 47 --- stepped-solutions/45/frontend/components/Nav.js | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 stepped-solutions/45/frontend/components/Nav.js (limited to 'stepped-solutions/45/frontend/components/Nav.js') diff --git a/stepped-solutions/45/frontend/components/Nav.js b/stepped-solutions/45/frontend/components/Nav.js new file mode 100755 index 0000000..594d048 --- /dev/null +++ b/stepped-solutions/45/frontend/components/Nav.js @@ -0,0 +1,49 @@ +import Link from 'next/link'; +import { Mutation } from 'react-apollo'; +import { TOGGLE_CART_MUTATION } from './Cart'; +import NavStyles from './styles/NavStyles'; +import User from './User'; +import CartCount from './CartCount'; +import Signout from './Signout'; + +const Nav = () => ( + + {({ data: { me } }) => ( + + + Shop + + {me && ( + <> + + Sell + + + Orders + + + Account + + + + {(toggleCart) => ( + + )} + + + )} + {!me && ( + + Sign In + + + )} + + )} + +); + +export default Nav; -- cgit v1.3