From 16ea551b4c56ee01e1477745051560342e246b15 Mon Sep 17 00:00:00 2001 From: amal Date: Wed, 15 Apr 2026 14:19:10 +0800 Subject: [PATCH] upd: list app --- src/frontend/routes/apps.$appId.errors.tsx | 13 +++++++++---- src/frontend/routes/bug-reports.tsx | 17 +++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/frontend/routes/apps.$appId.errors.tsx b/src/frontend/routes/apps.$appId.errors.tsx index 4fabc65..1ae5b90 100644 --- a/src/frontend/routes/apps.$appId.errors.tsx +++ b/src/frontend/routes/apps.$appId.errors.tsx @@ -68,6 +68,12 @@ function AppErrorsPage() { fetch(API_URLS.getBugs(page, search, app, status)).then((r) => r.json()), }) + // Fetch apps for the dropdown + const { data: appsList } = useQuery({ + queryKey: ['apps-list'], + queryFn: () => fetch('/api/apps').then((r) => r.json()), + }) + // Create Bug Modal Logic const [opened, { open, close }] = useDisclosure(false) const [isSubmitting, setIsSubmitting] = useState(false) @@ -344,12 +350,11 @@ function AppErrorsPage() { r.json()), }) + // Fetch apps for the dropdown + const { data: appsList } = useQuery({ + queryKey: ['apps-list'], + queryFn: () => fetch('/api/apps').then((r) => r.json()), + }) + // Create Bug Modal Logic const [opened, { open, close }] = useDisclosure(false) const [isSubmitting, setIsSubmitting] = useState(false) @@ -353,12 +359,11 @@ function ListErrorsPage() { ({ value: a.id, label: a.name })) || []), ]} value={app} onChange={(val) => setApp(val || 'all')} radius="md" + disabled={!appsList} />