fix: route home view-all links

This commit is contained in:
TerryM
2026-05-28 16:49:30 +08:00
parent 4c15e01460
commit 5fec82dbba
6 changed files with 90 additions and 68 deletions

View File

@@ -2,22 +2,20 @@ import { useSearchParams } from "react-router-dom";
import { MessageStream } from "../../components/messageStream/MessageStream";
import { SectionHeader } from "../../components/SectionHeader";
import { useI18n } from "../../i18n";
import { isPopularTag } from "../../utils/popularTag";
export function Browse() {
const { t, lang } = useI18n();
const { t } = useI18n();
const [sp] = useSearchParams();
const q = sp.get("q") || "";
const sort = sp.get("sort") || "";
const tag = sp.get("tag") || "";
const title = q
? `${t("search")}: ${q}`
: isPopularTag(tag, lang)
? t("popular")
: sort === "latest"
? t("latest")
: sort === "recommended"
? t("official")
: sort === "latest"
? t("latest")
: sort === "recommended"
? t("official")
: sort === "popular"
? t("popular")
: t("all");
return (
<section>