删除试卷管理列表页未使用的 countQuestions 死代码(评审发现)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-19 17:04:27 +08:00
co-authored by Claude Haiku 4.5
parent 522ff91525
commit 3de907164b
-9
View File
@@ -18,15 +18,6 @@ const MONTH_LABEL: Record<number, string> = {
};
const MONTH_ORDER = [0, 9, 10, 11, 12, 1];
function countQuestions(qs: string): number {
try {
const arr = JSON.parse(qs) as unknown[];
return Array.isArray(arr) ? arr.length : 0;
} catch {
return 0;
}
}
export default async function ExamsAdmin() {
const parent = await getSessionUser();
if (!parent) redirect("/login");