From 3d85eb0a872a31015d137399480ba3f9e6305f87 Mon Sep 17 00:00:00 2001 From: Harish Mohan Raj Date: Tue, 9 Apr 2024 10:29:02 +0530 Subject: [PATCH] Add pricing to navbar --- app/src/client/components/AppNavBar.tsx | 7 +------ app/src/client/components/UserMenuItems.tsx | 13 +++++++++++-- app/src/client/landing-page/contentSections.ts | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/src/client/components/AppNavBar.tsx b/app/src/client/components/AppNavBar.tsx index 98f0aed..a23bd73 100644 --- a/app/src/client/components/AppNavBar.tsx +++ b/app/src/client/components/AppNavBar.tsx @@ -10,12 +10,7 @@ import DropdownUser from './DropdownUser'; import { UserMenuItems } from '../components/UserMenuItems'; import FreeTrialButton from '../components/FreeTrialButton'; -export const navigation = [ - { name: 'Home', href: '/' }, - { name: 'Chat', href: '/chat' }, - // { name: 'Documentation', href: DOCS_URL }, - // { name: 'Blog', href: BLOG_URL }, -]; +import { navigation } from '../landing-page/contentSections'; const NavLogo = () => ( Capt’n.ai diff --git a/app/src/client/components/UserMenuItems.tsx b/app/src/client/components/UserMenuItems.tsx index 02d5922..a2551b6 100644 --- a/app/src/client/components/UserMenuItems.tsx +++ b/app/src/client/components/UserMenuItems.tsx @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { Link } from 'wasp/client/router'; import { type User } from 'wasp/entities'; import { logout } from 'wasp/client/auth'; @@ -17,6 +18,14 @@ export const UserMenuItems = ({ if (setMobileMenuOpen) setMobileMenuOpen(false); }; + const isChatPage = useMemo(() => { + return location.pathname.startsWith('/chat'); + }, [location]); + + const navFontColor = isChatPage + ? 'text-captn-light-cream' + : 'text-captn-dark-blue'; + return ( <>