@@ -2,8 +2,10 @@ import { Link } from "@tanstack/react-router";
22import { ArrowRight , Github } from "lucide-react"
33
44import { ConsentSettingsButton } from "#/components/consent/ConsentLayer"
5+ import { LanguageSwitcher } from "#/components/LanguageSwitcher"
56import ThemeToggle from "#/components/ThemeToggle"
67import { Button } from "#/components/ui/button"
8+ import * as m from "#/paraglide/messages.js"
79import { getLocale } from "#/paraglide/runtime.js"
810
911const t = ( zh : string , en : string ) => ( getLocale ( ) === "zh" ? zh : en )
@@ -35,14 +37,16 @@ export function SectionTitle({ children }: { children: React.ReactNode }) {
3537/* Nav + Footer */
3638/* -------------------------------------------------------------------------- */
3739
38- const NAV_LINKS : Array < { label : string ; href : string ; type : "anchor" | "route" } > = [
39- { label : "平台" , href : "/#platform" , type : "anchor" } ,
40- { label : "模块" , href : "/#modules" , type : "anchor" } ,
41- { label : "工作流" , href : "/#workflow" , type : "anchor" } ,
42- { label : "开发者" , href : "/#developer" , type : "anchor" } ,
43- { label : "定价" , href : "/pricing" , type : "route" } ,
44- { label : "文档" , href : "/docs" , type : "route" } ,
45- ]
40+ function getNavLinks ( ) {
41+ return [
42+ { label : m . nav_platform ( ) , href : "/#platform" , type : "anchor" as const } ,
43+ { label : m . nav_modules ( ) , href : "/#modules" , type : "anchor" as const } ,
44+ { label : m . nav_workflow ( ) , href : "/#workflow" , type : "anchor" as const } ,
45+ { label : m . nav_developer ( ) , href : "/#developer" , type : "anchor" as const } ,
46+ { label : m . nav_pricing ( ) , href : "/pricing" , type : "route" as const } ,
47+ { label : m . nav_docs ( ) , href : "/docs" , type : "route" as const } ,
48+ ]
49+ }
4650
4751function TopNav ( ) {
4852 return (
@@ -55,18 +59,19 @@ function TopNav() {
5559 < span > ApolloKit</ span >
5660 </ Link >
5761 < nav className = "hidden items-center gap-6 text-sm text-muted-foreground md:flex" >
58- { NAV_LINKS . map ( ( l ) => (
62+ { getNavLinks ( ) . map ( ( l ) => (
5963 < a key = { l . href } href = { l . href } className = "hover:text-foreground" >
6064 { l . label }
6165 </ a >
6266 ) ) }
6367 </ nav >
6468 < div className = "ml-auto flex items-center gap-2" >
69+ < LanguageSwitcher />
6570 < ThemeToggle />
6671 < Button
6772 render = {
6873 < Link to = "/auth/$authView" params = { { authView : "sign-in" } } >
69- 登录
74+ { m . auth_sign_in ( ) }
7075 </ Link >
7176 }
7277 variant = "ghost"
@@ -76,7 +81,7 @@ function TopNav() {
7681 < Button
7782 render = {
7883 < Link to = "/auth/$authView" params = { { authView : "sign-up" } } >
79- 免费开始
84+ { m . auth_sign_up_cta ( ) }
8085 < ArrowRight className = "ml-1 size-3.5" />
8186 </ Link >
8287 }
0 commit comments