From 772a93c9dc6430567deebd0d46a0f081a597be94 Mon Sep 17 00:00:00 2001 From: huazhuang80-star <295584745+huazhuang80-star@users.noreply.github.com> Date: Sun, 21 Jun 2026 23:10:34 +0800 Subject: [PATCH] Sync landing nav and footer links --- components/landing/footer.tsx | 8 ++---- components/landing/landing-nav.tsx | 12 +++------ lib/landing-nav.ts | 41 ++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 lib/landing-nav.ts diff --git a/components/landing/footer.tsx b/components/landing/footer.tsx index c9b4e6f..75476c5 100644 --- a/components/landing/footer.tsx +++ b/components/landing/footer.tsx @@ -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 }, diff --git a/components/landing/landing-nav.tsx b/components/landing/landing-nav.tsx index 99ae0dc..30c414b 100644 --- a/components/landing/landing-nav.tsx +++ b/components/landing/landing-nav.tsx @@ -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); @@ -46,7 +40,7 @@ export function LandingNav() {
- {NAV_LINKS.map(({ href, label }) => ( + {HEADER_NAV_LINKS.map(({ href, label }) => (
- {NAV_LINKS.map(({ href, label }) => ( + {HEADER_NAV_LINKS.map(({ href, label }) => ( showInHeader +); + +export const FOOTER_NAV_LINKS = LANDING_SECTION_LINKS.filter( + ({ showInFooter }) => showInFooter +);