31 lines
820 B
Plaintext
31 lines
820 B
Plaintext
---
|
|
import { alternatePath, type Locale, t } from "@app/i18n";
|
|
import { Toaster } from "@app/ui";
|
|
import { BrowseBody } from "~/components/pages/BrowseBody";
|
|
import AppLayout from "~/layouts/AppLayout.astro";
|
|
|
|
export interface Props {
|
|
locale: Locale;
|
|
}
|
|
|
|
const { locale } = Astro.props;
|
|
const other: Locale = locale === "zh-CN" ? "en" : "zh-CN";
|
|
---
|
|
|
|
<AppLayout
|
|
title={t(locale, "browse.title")}
|
|
locale={locale}
|
|
active="browse"
|
|
brand={t(locale, "meta.product")}
|
|
switchHref={alternatePath(Astro.url.pathname, other)}
|
|
switchLabel={t(other, `locale.${other}` as never)}
|
|
seo={{
|
|
title: `${t(locale, "browse.title")} · ${t(locale, "meta.brand")}`,
|
|
path: Astro.url.pathname,
|
|
robots: ["noindex", "nofollow"],
|
|
}}
|
|
>
|
|
<BrowseBody locale={locale} client:load />
|
|
<Toaster client:load />
|
|
</AppLayout>
|