Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pricing to navbar #306

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading