|
| 1 | +"use client"; |
| 2 | + |
| 3 | +// The /base landing — the pitch page for Base ecosystem programs (Base Batches |
| 4 | +// and friends). One job: show that Gnars is a COMPLETE onchain DAO living on |
| 5 | +// Base — auctions, governance, treasury, droposals, swap, staking — with the |
| 6 | +// Base-native plumbing (sponsored gas, social login, Farcaster mini-app) |
| 7 | +// spelled out. Every feature card links to the live surface, because the pitch |
| 8 | +// is that it all already works. |
| 9 | +import { useTranslations } from "next-intl"; |
| 10 | +import { ArrowLeftRight, Disc3, Gavel, HandCoins, Landmark, PiggyBank } from "lucide-react"; |
| 11 | +import { CARD, CARD_PAD, MUTED } from "@/components/stake/stake-ui"; |
| 12 | +import { Button } from "@/components/ui/button"; |
| 13 | +import { Link } from "@/i18n/navigation"; |
| 14 | + |
| 15 | +// Base brand blue — the page's one accent, used the way /stake uses gold. |
| 16 | +const BASE_BLUE = "#0052FF"; |
| 17 | + |
| 18 | +const FEATURES = [ |
| 19 | + { key: "auctions", href: "/auctions", Icon: Gavel }, |
| 20 | + { key: "governance", href: "/proposals", Icon: Landmark }, |
| 21 | + { key: "treasury", href: "/treasury", Icon: PiggyBank }, |
| 22 | + { key: "droposals", href: "/droposals", Icon: Disc3 }, |
| 23 | + { key: "swap", href: "/swap", Icon: ArrowLeftRight }, |
| 24 | + { key: "staking", href: "/stake", Icon: HandCoins }, |
| 25 | +] as const; |
| 26 | + |
| 27 | +const UNDER_HOOD = ["aa", "login", "farcaster", "mobile"] as const; |
| 28 | + |
| 29 | +export function BasePageContent() { |
| 30 | + const t = useTranslations("base"); |
| 31 | + |
| 32 | + return ( |
| 33 | + <div className="mx-auto flex w-full max-w-5xl flex-col gap-6 px-4 sm:px-6"> |
| 34 | + {/* Hero */} |
| 35 | + <section className={`${CARD} ${CARD_PAD} sm:p-8`}> |
| 36 | + <span |
| 37 | + className="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[11px] font-bold uppercase tracking-wider text-white" |
| 38 | + style={{ backgroundColor: BASE_BLUE }} |
| 39 | + > |
| 40 | + {/* Base's mark is a plain circle — drawn, not an asset we redistribute. */} |
| 41 | + <span className="h-2.5 w-2.5 rounded-full bg-white" aria-hidden /> |
| 42 | + {t("eyebrow")} |
| 43 | + </span> |
| 44 | + <h1 className="mt-3 text-3xl font-black tracking-tight sm:text-5xl">{t("title")}</h1> |
| 45 | + <p className={`mt-3 max-w-2xl text-sm sm:text-base ${MUTED}`}>{t("lede")}</p> |
| 46 | + <div className="mt-5 flex flex-wrap items-center gap-3"> |
| 47 | + <Button |
| 48 | + asChild |
| 49 | + className="border-0 font-bold text-white hover:opacity-90" |
| 50 | + style={{ backgroundColor: BASE_BLUE }} |
| 51 | + > |
| 52 | + <Link href="/auctions">{t("ctaAuctions")}</Link> |
| 53 | + </Button> |
| 54 | + <Button asChild variant="outline"> |
| 55 | + <Link href="/proposals">{t("ctaGovernance")}</Link> |
| 56 | + </Button> |
| 57 | + </div> |
| 58 | + </section> |
| 59 | + |
| 60 | + {/* Feature grid — each card is a link to the live surface */} |
| 61 | + <section className={`${CARD} ${CARD_PAD} sm:p-8`}> |
| 62 | + <h2 className="text-lg font-bold tracking-tight">{t("featuresTitle")}</h2> |
| 63 | + <ul className="mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3"> |
| 64 | + {FEATURES.map(({ key, href, Icon }) => ( |
| 65 | + <li key={key}> |
| 66 | + <Link |
| 67 | + href={href} |
| 68 | + className="group flex h-full flex-col rounded-2xl border border-border/60 bg-background/40 p-4 transition-colors hover:border-[#0052FF]/50" |
| 69 | + > |
| 70 | + <span |
| 71 | + className="flex h-10 w-10 items-center justify-center rounded-xl text-white" |
| 72 | + style={{ backgroundColor: BASE_BLUE }} |
| 73 | + > |
| 74 | + <Icon className="h-5 w-5" aria-hidden /> |
| 75 | + </span> |
| 76 | + <span className="mt-3 text-sm font-semibold group-hover:underline"> |
| 77 | + {t(`features.${key}.title`)} |
| 78 | + </span> |
| 79 | + <span className={`mt-1 text-xs leading-relaxed ${MUTED}`}> |
| 80 | + {t(`features.${key}.desc`)} |
| 81 | + </span> |
| 82 | + </Link> |
| 83 | + </li> |
| 84 | + ))} |
| 85 | + </ul> |
| 86 | + </section> |
| 87 | + |
| 88 | + {/* The Base-native plumbing — the part reviewers actually ask about */} |
| 89 | + <section className={`${CARD} ${CARD_PAD}`}> |
| 90 | + <h2 className="text-lg font-bold tracking-tight">{t("underHoodTitle")}</h2> |
| 91 | + <ul className="mt-3 grid gap-2.5 sm:grid-cols-2"> |
| 92 | + {UNDER_HOOD.map((k) => ( |
| 93 | + <li key={k} className="flex items-start gap-2.5 text-sm"> |
| 94 | + <span |
| 95 | + className="mt-1.5 h-2 w-2 shrink-0 rounded-full" |
| 96 | + style={{ backgroundColor: BASE_BLUE }} |
| 97 | + aria-hidden |
| 98 | + /> |
| 99 | + <span className={MUTED}>{t(`underHood.${k}`)}</span> |
| 100 | + </li> |
| 101 | + ))} |
| 102 | + </ul> |
| 103 | + <p className="mt-5 max-w-3xl text-sm leading-relaxed">{t("culture")}</p> |
| 104 | + </section> |
| 105 | + </div> |
| 106 | + ); |
| 107 | +} |
0 commit comments