增加研究覆盖审计及分类数据直达链接

This commit is contained in:
2026-10-30 06:24:56 +08:00
parent c7aa6e54c6
commit b52d1e59a4
7 changed files with 198 additions and 2 deletions
@@ -36,7 +36,12 @@ export default function AICompanyResearch() {
const [error, setError] = useState(false);
const [attempt, setAttempt] = useState(0);
const [query, setQuery] = useState("");
const [category, setCategory] = useState("");
const [categoryChoice, setCategoryChoice] = useState<{ route: string; id: string } | null>(null);
const linkedCategory = router.query.category;
const category = categoryChoice && categoryChoice.route === router.asPath ? categoryChoice.id
: router.isReady && typeof linkedCategory === "string" && data?.categories.some((c) => c.id === linkedCategory)
? linkedCategory : "";
function setCategory(id: string) { setCategoryChoice({ route: router.asPath, id }); }
const [cohort, setCohort] = useState("");
const [income, setIncome] = useState("");
const [page, setPage] = useState(0);