From 3776a90ba1f1a83d237c9be4b7e38c7831823130 Mon Sep 17 00:00:00 2001 From: Kellan Wampler Date: Tue, 1 Nov 2022 11:04:24 -0400 Subject: [PATCH] Fixing layout colors when logged in. --- frontend/pages/welcome.js | 2 +- frontend/src/components/AccountIconButton.js | 1 + frontend/src/components/AddNewIconButton.js | 5 +++-- frontend/src/components/AppNavbar.js | 10 ++++------ frontend/src/components/LandingNavbar.js | 2 +- frontend/src/layouts/AppLayout.js | 9 ++++++++- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/frontend/pages/welcome.js b/frontend/pages/welcome.js index 165f87ba..9e3470e8 100644 --- a/frontend/pages/welcome.js +++ b/frontend/pages/welcome.js @@ -27,7 +27,7 @@ const Welcome = () => { return ( - + {/* { zIndex="dropdown" width={["100vw", "100vw", "18rem", "20rem", "22rem", "24rem"]} borderRadius={0} + color="black" > diff --git a/frontend/src/components/AddNewIconButton.js b/frontend/src/components/AddNewIconButton.js index b803cdf0..8c1ba2cf 100644 --- a/frontend/src/components/AddNewIconButton.js +++ b/frontend/src/components/AddNewIconButton.js @@ -7,6 +7,7 @@ import { MenuGroup, MenuDivider, IconButton, + Text, chakra, } from "@chakra-ui/react"; import { PlusSquareIcon } from "@chakra-ui/icons"; @@ -44,7 +45,7 @@ const AddNewIconButton = (props) => { }) } > - New Dashboard... + New Dashboard... @@ -54,7 +55,7 @@ const AddNewIconButton = (props) => { }) } > - New Subscription... + New Subscription... {ui.isInDashboard && New report...} diff --git a/frontend/src/components/AppNavbar.js b/frontend/src/components/AppNavbar.js index dab09f47..14f4ccba 100644 --- a/frontend/src/components/AppNavbar.js +++ b/frontend/src/components/AppNavbar.js @@ -76,7 +76,7 @@ const AppNavbar = () => { icon={} /> - + Support @@ -110,7 +110,7 @@ const AppNavbar = () => { - + {SITEMAP.map((item, idx) => { if ( !item.children && @@ -121,10 +121,9 @@ const AppNavbar = () => { key={`${idx}-${item.title}-landing-all-links`} variant="link" href={item.path} - color="white" isActive={!!(router.pathname === item.path)} > - {item.title} + {item.title} ); } else if (!item.footerOnly) { @@ -147,7 +146,7 @@ const AppNavbar = () => { passHref > - {child.title} + {child.title} ))} @@ -163,7 +162,6 @@ const AppNavbar = () => { key={`${idx}-${item.title}-navlink`} variant="link" href={item.path} - color="white" isActive={!!(router.nextRouter.pathname === item.path)} > {item.title} diff --git a/frontend/src/components/LandingNavbar.js b/frontend/src/components/LandingNavbar.js index c1282547..eae12942 100644 --- a/frontend/src/components/LandingNavbar.js +++ b/frontend/src/components/LandingNavbar.js @@ -77,7 +77,7 @@ const LandingNavbar = () => { key={`${idx}-${item.title}-landing-all-links`} variant="link" href={item.path} - color="white" + color="black" isActive={!!(router.pathname === item.path)} > {item.title} diff --git a/frontend/src/layouts/AppLayout.js b/frontend/src/layouts/AppLayout.js index d449dafa..566b65c2 100644 --- a/frontend/src/layouts/AppLayout.js +++ b/frontend/src/layouts/AppLayout.js @@ -3,6 +3,7 @@ import { getLayout as getSiteLayout } from "./RootLayout"; import React, { useContext, useEffect } from "react"; import UIContext from "../core/providers/UIProvider/context"; import AppNavbar from "../components/AppNavbar"; +import { BACKGROUND_COLOR } from "../core/constants"; const AppLayout = ({ children }) => { const ui = useContext(UIContext); @@ -18,6 +19,7 @@ const AppLayout = ({ children }) => { return ( { zIndex={1010} /> )} - + {ui.isAppReady && ui.isLoggedIn && children}