Skip to content

Commit fe0bfcb

Browse files
committed
Unify About with primary nav links
1 parent 2fa0013 commit fe0bfcb

3 files changed

Lines changed: 14 additions & 35 deletions

File tree

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link';
2-
import { ABOUT_NAV_LINK, PUBLIC_NAV_LINKS } from '@/components/navigation/config';
2+
import { PUBLIC_NAV_LINKS } from '@/components/navigation/config';
33
import { isNavActive } from '@/components/navigation/utils';
44

55
interface DesktopNavigationLinksProps {
@@ -8,25 +8,16 @@ interface DesktopNavigationLinksProps {
88

99
export function DesktopNavigationLinks({ pathname }: DesktopNavigationLinksProps) {
1010
return (
11-
<div className="flex items-center gap-1">
12-
<nav className="hidden md:flex items-center gap-1">
13-
{PUBLIC_NAV_LINKS.map((link) => (
14-
<Link
15-
key={link.href}
16-
href={link.href}
17-
className={`nav-link ${isNavActive(pathname, link.href) ? 'nav-link-active' : ''}`}
18-
>
19-
{link.label}
20-
</Link>
21-
))}
22-
</nav>
23-
24-
<Link
25-
href={ABOUT_NAV_LINK.href}
26-
className={`nav-link hidden sm:block ${isNavActive(pathname, ABOUT_NAV_LINK.href) ? 'nav-link-active' : ''}`}
27-
>
28-
{ABOUT_NAV_LINK.label}
29-
</Link>
30-
</div>
11+
<nav className="hidden md:flex items-center gap-1">
12+
{PUBLIC_NAV_LINKS.map((link) => (
13+
<Link
14+
key={link.href}
15+
href={link.href}
16+
className={`nav-link ${isNavActive(pathname, link.href) ? 'nav-link-active' : ''}`}
17+
>
18+
{link.label}
19+
</Link>
20+
))}
21+
</nav>
3122
);
3223
}

components/navigation/MobileNavigationMenu.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link';
2-
import { ABOUT_NAV_LINK, PUBLIC_NAV_LINKS } from '@/components/navigation/config';
2+
import { PUBLIC_NAV_LINKS } from '@/components/navigation/config';
33
import { isNavActive } from '@/components/navigation/utils';
44

55
interface MobileNavigationMenuProps {
@@ -36,17 +36,6 @@ export function MobileNavigationMenu({
3636
{link.label}
3737
</Link>
3838
))}
39-
<Link
40-
href={ABOUT_NAV_LINK.href}
41-
onClick={onNavigate}
42-
className={`px-4 py-3 rounded-lg transition-colors ${
43-
isNavActive(pathname, ABOUT_NAV_LINK.href)
44-
? 'bg-[var(--accent-gold-dim)] text-[var(--accent-gold)]'
45-
: 'text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] hover:text-[var(--text-primary)]'
46-
}`}
47-
>
48-
{ABOUT_NAV_LINK.label}
49-
</Link>
5039
</nav>
5140
</div>
5241
);

components/navigation/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export const PUBLIC_NAV_LINKS = [
33
{ href: '/cohorts', label: 'Cohorts' },
44
{ href: '/markets', label: 'Markets' },
55
{ href: '/methodology', label: 'Methodology' },
6+
{ href: '/about', label: 'About' },
67
] as const;
7-
8-
export const ABOUT_NAV_LINK = { href: '/about', label: 'About' } as const;

0 commit comments

Comments
 (0)