2026-05-27 11:33:48 +08:00
|
|
|
import { useSearchParams } from "react-router-dom";
|
2026-05-26 14:46:05 +08:00
|
|
|
import { MessageStream } from "../../components/messageStream/MessageStream";
|
2026-05-28 15:11:13 +08:00
|
|
|
import { SectionHeader } from "../../components/SectionHeader";
|
2026-05-26 14:46:05 +08:00
|
|
|
import { useI18n } from "../../i18n";
|
2026-05-16 00:18:22 +08:00
|
|
|
|
|
|
|
|
export function Browse() {
|
2026-05-28 16:49:30 +08:00
|
|
|
const { t } = useI18n();
|
2026-05-27 11:33:48 +08:00
|
|
|
const [sp] = useSearchParams();
|
|
|
|
|
const q = sp.get("q") || "";
|
2026-05-28 16:28:50 +08:00
|
|
|
const sort = sp.get("sort") || "";
|
|
|
|
|
const title = q
|
|
|
|
|
? `${t("search")}: ${q}`
|
2026-05-28 16:49:30 +08:00
|
|
|
: sort === "latest"
|
|
|
|
|
? t("latest")
|
|
|
|
|
: sort === "recommended"
|
|
|
|
|
? t("official")
|
|
|
|
|
: sort === "popular"
|
|
|
|
|
? t("popular")
|
2026-05-28 16:28:50 +08:00
|
|
|
: t("all");
|
2026-05-16 00:18:22 +08:00
|
|
|
return (
|
2026-05-28 15:11:13 +08:00
|
|
|
<section>
|
|
|
|
|
<div className="mx-auto max-w-full px-4 md:max-w-[820px] lg:max-w-[1080px] xl:max-w-[1180px]">
|
2026-05-28 16:28:50 +08:00
|
|
|
<SectionHeader title={title} />
|
2026-05-28 15:11:13 +08:00
|
|
|
</div>
|
2026-05-25 05:25:57 +08:00
|
|
|
<MessageStream scope={{ kind: "all" }} />
|
|
|
|
|
</section>
|
2026-05-16 00:18:22 +08:00
|
|
|
);
|
|
|
|
|
}
|