From 492b97213e8fa9151fe8497588ad28b3311f4aeb Mon Sep 17 00:00:00 2001 From: WuYongJie Date: Sat, 22 Nov 2025 18:16:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=88=86=E7=B1=BBAPI=E7=9A=84Set=E8=BF=AD=E4=BB=A3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=92=8CUploadModal=E7=9A=84useEffect=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/template-categories/route.ts | 2 +- components/UploadModal.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/api/template-categories/route.ts b/app/api/template-categories/route.ts index f00aa5c..65e8415 100644 --- a/app/api/template-categories/route.ts +++ b/app/api/template-categories/route.ts @@ -76,7 +76,7 @@ export async function GET() { categories.push({ fieldKey: field.key, fieldLabel: field.label, - options: [...new Set(options)].sort(), + options: Array.from(new Set(options)).sort(), }) } } diff --git a/components/UploadModal.tsx b/components/UploadModal.tsx index c800066..2aff16b 100644 --- a/components/UploadModal.tsx +++ b/components/UploadModal.tsx @@ -236,6 +236,7 @@ export default function UploadModal({ onClose, onSuccess }: UploadModalProps) { fetchScenes() fetchPlatforms() fetchTemplates() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []) const fetchCategories = async () => {