Skip to content
Open
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
8 changes: 2 additions & 6 deletions components/landing/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { Logo } from "@/components/landing/logo";
import { SocialButtons } from "@/components/landing/social-buttons";
import { FOOTER_NAV_LINKS } from "@/lib/landing-nav";
import { getDappUrl, siteConfig } from "@/lib/site";

const FOOTER_LINKS = {
links: [
{ label: "Problem", href: "#problem" },
{ label: "Solution", href: "#solution" },
{ label: "FAQ", href: "#faq" },
{ label: "Contact", href: siteConfig.issues },
],
links: FOOTER_NAV_LINKS,
resources: [
{ label: "GitHub", href: siteConfig.github, external: true },
{ label: "API", href: siteConfig.backendRepo, external: true },
Expand Down
12 changes: 3 additions & 9 deletions components/landing/landing-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@ import { useEffect, useState } from "react";
import { Menu, X, ArrowUpRight } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Logo } from "@/components/landing/logo";
import { HEADER_NAV_LINKS } from "@/lib/landing-nav";
import { cn } from "@/lib/utils";
import { getDappUrl } from "@/lib/site";

const NAV_LINKS = [
{ href: "#problem", label: "Problem" },
{ href: "#solution", label: "Solution" },
{ href: "#score", label: "Score" },
{ href: "#faq", label: "FAQ" },
];

export function LandingNav() {
const [open, setOpen] = useState(false);
const [scrolled, setScrolled] = useState(false);
Expand Down Expand Up @@ -46,7 +40,7 @@ export function LandingNav() {
<Logo size="sm" href="/" onClick={closeMenu} className="group" />

<div className="hidden md:flex items-center gap-8 text-xs text-white/40 uppercase tracking-zk">
{NAV_LINKS.map(({ href, label }) => (
{HEADER_NAV_LINKS.map(({ href, label }) => (
<a
key={href}
href={href}
Expand Down Expand Up @@ -89,7 +83,7 @@ export function LandingNav() {
)}
>
<div className="px-4 py-4 space-y-1">
{NAV_LINKS.map(({ href, label }) => (
{HEADER_NAV_LINKS.map(({ href, label }) => (
<a
key={href}
href={href}
Expand Down
41 changes: 41 additions & 0 deletions lib/landing-nav.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export type LandingNavLink = {
href: `#${string}`;
label: string;
showInHeader?: boolean;
showInFooter?: boolean;
};

export const LANDING_SECTION_LINKS: LandingNavLink[] = [
{
href: "#problem",
label: "Problem",
showInHeader: true,
showInFooter: true,
},
{
href: "#solution",
label: "Solution",
showInHeader: true,
showInFooter: true,
},
{
href: "#how-it-works",
label: "How It Works",
showInHeader: true,
showInFooter: true,
},
{ href: "#partners", label: "Partners", showInFooter: true },
{ href: "#score", label: "Score", showInHeader: true, showInFooter: true },
{ href: "#tiers", label: "Tiers", showInFooter: true },
{ href: "#community", label: "Community", showInFooter: true },
{ href: "#faq", label: "FAQ", showInHeader: true, showInFooter: true },
{ href: "#launch", label: "Launch", showInFooter: true },
];

export const HEADER_NAV_LINKS = LANDING_SECTION_LINKS.filter(
({ showInHeader }) => showInHeader
);

export const FOOTER_NAV_LINKS = LANDING_SECTION_LINKS.filter(
({ showInFooter }) => showInFooter
);