From 34112b30dfda53f06fda61e39aa3823f968d3fc5 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 20 Sep 2020 19:36:51 -0700 Subject: [PATCH] add site title to left nav, move Modeling to right Honestly I don't think this is the long-term home for the Modeling link, I think it'll become a homepage-only link as we add more modules there. But I wanted to get it out of the way! --- src/app/GlobalNavBar.js | 89 ++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/src/app/GlobalNavBar.js b/src/app/GlobalNavBar.js index 3948d54..e82938d 100644 --- a/src/app/GlobalNavBar.js +++ b/src/app/GlobalNavBar.js @@ -1,18 +1,8 @@ import React from "react"; -import { - Box, - Button, - HStack, - IconButton, - Menu, - MenuButton, - MenuItem, - MenuList, - useBreakpointValue, -} from "@chakra-ui/core"; +import { Box, Button, HStack, IconButton } from "@chakra-ui/core"; import { Link, useLocation } from "react-router-dom"; import { useAuth0 } from "@auth0/auth0-react"; -import { ChevronLeftIcon, HamburgerIcon } from "@chakra-ui/icons"; +import { ChevronLeftIcon } from "@chakra-ui/icons"; import useCurrentUser from "./components/useCurrentUser"; @@ -20,15 +10,20 @@ import HomeLinkIcon from "../images/home-link-icon.png"; import HomeLinkIcon2x from "../images/home-link-icon@2x.png"; function GlobalNavBar() { - const navStyle = useBreakpointValue({ base: "menu", md: "buttons" }); + const { pathname } = useLocation(); + const isHomePage = pathname === "/"; return ( - - - {navStyle === "menu" && } - {navStyle === "buttons" && } - + + + + @@ -36,10 +31,7 @@ function GlobalNavBar() { ); } -function HomeLink() { - const { pathname } = useLocation(); - const isHomePage = pathname === "/"; - +function HomeLink({ showArrow }) { return ( @@ -104,46 +96,41 @@ function UserNavBarSection() { )} {id && ( - + Items )} + + Modeling + logout({ returnTo: window.location.origin })}> Log out ); } else { - return loginWithRedirect()}>Log in; + return ( + + + Modeling + + loginWithRedirect()}>Log in + + ); } } -function NavMenu() { +function DressToImpressTitle(props) { return ( - - } /> - - - Home - - - Modeling - - - - ); -} - -function NavButtons() { - return ( - - Modeling - + + Dress to Impress + ); }