feat: separate popular browse navigation

This commit is contained in:
TerryM
2026-05-28 16:28:50 +08:00
parent fea6e1c93b
commit 6a998c0186
3 changed files with 49 additions and 13 deletions

View File

@@ -7,10 +7,20 @@ export function Browse() {
const { t } = useI18n();
const [sp] = useSearchParams();
const q = sp.get("q") || "";
const sort = sp.get("sort") || "";
const title = q
? `${t("search")}: ${q}`
: sort === "latest"
? t("latest")
: sort === "popular"
? t("popular")
: sort === "recommended"
? t("official")
: t("all");
return (
<section>
<div className="mx-auto max-w-full px-4 md:max-w-[820px] lg:max-w-[1080px] xl:max-w-[1180px]">
<SectionHeader title={q ? `${t("search")}: ${q}` : t("all")} />
<SectionHeader title={title} />
</div>
<MessageStream scope={{ kind: "all" }} />
</section>