Skip to content

Commit

Permalink
Add pricing to navbar (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj authored Apr 9, 2024
1 parent 185934f commit 5e268f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 1 addition & 6 deletions app/src/client/components/AppNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => (
<img className='h-10 w-auto -ml-2' src={logo} alt='Capt’n.ai' />
Expand Down
13 changes: 11 additions & 2 deletions app/src/client/components/UserMenuItems.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 (
<>
<ul
Expand All @@ -39,7 +48,7 @@ export const UserMenuItems = ({
<Link
to='/account'
onClick={handleMobileMenuClick}
className='no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue'
className={`${navFontColor} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg:text-captn-light-cream hover:text-captn-light-blue`}
>
<svg
className='fill-current'
Expand Down Expand Up @@ -72,7 +81,7 @@ export const UserMenuItems = ({
<Link
to='/admin'
onClick={handleMobileMenuClick}
className='no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue'
className={`${navFontColor} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg:text-captn-light-cream hover:text-captn-light-blue`}
>
<TfiDashboard size='1.1rem' />
Admin dashboard
Expand Down
1 change: 1 addition & 0 deletions app/src/client/landing-page/contentSections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import avatarPlaceholder from '../static/avatar-placeholder.png';
export const navigation = [
{ name: 'Home', href: '/' },
{ name: 'Chat', href: '/chat' },
{ name: 'Pricing', href: '/pricing' },
// { name: 'Documentation', href: DOCS_URL },
// { name: 'Blog', href: BLOG_URL },
];
Expand Down

0 comments on commit 5e268f7

Please sign in to comment.