diff --git a/.github/workflows/website.yaml b/.github/workflows/website.yaml index c379163e7a0..d9cf4e0c741 100644 --- a/.github/workflows/website.yaml +++ b/.github/workflows/website.yaml @@ -39,10 +39,10 @@ jobs: java-version: 25 distribution: temurin cache: 'maven' - - name: Set up Node.js 22 + - name: Set up Node.js 24 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 22 + node-version: 24.18.1 cache: 'npm' cache-dependency-path: zookeeper-website/package-lock.json - name: Show the first log message diff --git a/zookeeper-website/app/components/docs/layout/docs/index.tsx b/zookeeper-website/app/components/docs/layout/docs/index.tsx index 0bf6e17334e..4388b372f6f 100644 --- a/zookeeper-website/app/components/docs/layout/docs/index.tsx +++ b/zookeeper-website/app/components/docs/layout/docs/index.tsx @@ -75,7 +75,8 @@ export interface DocsLayoutProps extends BaseLayoutProps { } interface SidebarOptions - extends ComponentProps<"aside">, + extends + ComponentProps<"aside">, Pick, "defaultOpenLevel" | "prefetch"> { enabled?: boolean; component?: ReactNode; diff --git a/zookeeper-website/app/components/docs/layout/docs/page/client.tsx b/zookeeper-website/app/components/docs/layout/docs/page/client.tsx index affc22a8428..b954cb84269 100644 --- a/zookeeper-website/app/components/docs/layout/docs/page/client.tsx +++ b/zookeeper-website/app/components/docs/layout/docs/page/client.tsx @@ -29,8 +29,8 @@ import { } from "react"; import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react"; import Link from "fumadocs-core/link"; -import { useI18n } from "fumadocs-ui/contexts/i18n"; import { useTreeContext, useTreePath } from "fumadocs-ui/contexts/tree"; +import { T } from "@fuma-translate/react"; import type * as PageTree from "fumadocs-core/page-tree"; import { usePathname } from "fumadocs-core/framework"; import { @@ -75,7 +75,7 @@ export function PageTOCPopover({ return () => { window.removeEventListener("click", onClick); }; - }, [onClick]); + }, []); return ( ) { - const { text } = useI18n(); const { open } = use(TocPopoverContext)!; const items = useTOCItems(); const active = useActiveAnchor(); @@ -149,7 +148,7 @@ export function PageTOCPopoverTrigger({ showItem && "pointer-events-none -translate-y-full opacity-0" )} > - {path?.name ?? text.toc} + {path?.name ?? } , "strokeWidth"> { +interface ProgressCircleProps extends Omit< + React.ComponentProps<"svg">, + "strokeWidth" +> { value: number; strokeWidth?: number; size?: number; @@ -244,7 +245,6 @@ export function PageLastUpdate({ date: value, ...props }: Omit, "children"> & { date: Date }) { - const { text } = useI18n(); const [date, setDate] = useState(""); useEffect(() => { @@ -257,7 +257,7 @@ export function PageLastUpdate({ {...props} className={cn("text-fd-muted-foreground text-sm", props.className)} > - {text.lastUpdate} {date} + {date}

); } @@ -314,7 +314,6 @@ export function PageFooter({ } function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) { - const { text } = useI18n(); const Icon = index === 0 ? ChevronLeft : ChevronRight; return ( @@ -335,7 +334,12 @@ function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {

{item.name}

- {item.description ?? (index === 0 ? text.previousPage : text.nextPage)} + {item.description ?? + (index === 0 ? ( + + ) : ( + + ))}

); diff --git a/zookeeper-website/app/components/docs/layout/docs/page/index.tsx b/zookeeper-website/app/components/docs/layout/docs/page/index.tsx index 05c0fde3f20..2a66c2508c7 100644 --- a/zookeeper-website/app/components/docs/layout/docs/page/index.tsx +++ b/zookeeper-website/app/components/docs/layout/docs/page/index.tsx @@ -19,7 +19,7 @@ import type { ComponentProps, ReactNode } from "react"; import { buttonVariants } from "../../../../../ui/button"; import { Edit, Text } from "lucide-react"; -import { I18nLabel } from "fumadocs-ui/contexts/i18n"; +import { T } from "@fuma-translate/react"; import { type BreadcrumbProps, type FooterProps, @@ -193,7 +193,7 @@ export function DocsPage({ className="text-fd-muted-foreground inline-flex items-center gap-1.5 text-sm" > - + {tocOptions.style === "clerk" ? ( @@ -227,7 +227,7 @@ export function EditOnGitHub(props: ComponentProps<"a">) { {props.children ?? ( <> - + )} diff --git a/zookeeper-website/app/components/docs/layout/language-toggle.tsx b/zookeeper-website/app/components/docs/layout/language-toggle.tsx index 6b423932043..d676ed8f599 100644 --- a/zookeeper-website/app/components/docs/layout/language-toggle.tsx +++ b/zookeeper-website/app/components/docs/layout/language-toggle.tsx @@ -18,6 +18,7 @@ import type { ComponentProps } from "react"; import { useI18n } from "fumadocs-ui/contexts/i18n"; +import { T, useTranslations } from "@fuma-translate/react"; import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/popover"; import { buttonVariants } from "../../../ui/button"; import { cn } from "@/lib/utils"; @@ -26,12 +27,13 @@ export type LanguageSelectProps = ComponentProps<"button">; export function LanguageToggle(props: LanguageSelectProps): React.ReactElement { const context = useI18n(); + const t = useTranslations(); if (!context.locales) throw new Error("Missing ``"); return (

- {context.text.chooseLanguage} +

{context.locales.map((item) => (