diff --git a/frontend/src/pages/AdminGroupsPage.tsx b/frontend/src/pages/AdminGroupsPage.tsx index f20d867..878470c 100644 --- a/frontend/src/pages/AdminGroupsPage.tsx +++ b/frontend/src/pages/AdminGroupsPage.tsx @@ -15,9 +15,10 @@ import { export default function AdminGroupsPage() { const queryClient = useQueryClient(); - const { data: groups = [], isLoading } = useQuery({ + const { data: groups = [], isLoading, isError, error } = useQuery({ queryKey: ["admin-groups"], queryFn: adminListGroups, + retry: 1, }); const [showForm, setShowForm] = useState(false); @@ -97,6 +98,11 @@ export default function AdminGroupsPage() { {isLoading ? (

Loading…

+ ) : isError ? ( +

+ Failed to load groups:{" "} + {(error as any)?.response?.data?.detail ?? (error as any)?.message ?? "Unknown error"} +

) : ( diff --git a/frontend/src/pages/AdminUsersPage.tsx b/frontend/src/pages/AdminUsersPage.tsx index fa6cb02..97cb929 100644 --- a/frontend/src/pages/AdminUsersPage.tsx +++ b/frontend/src/pages/AdminUsersPage.tsx @@ -13,9 +13,10 @@ import { export default function AdminUsersPage() { const queryClient = useQueryClient(); const { data: me } = useQuery({ queryKey: ["me"], queryFn: getMe }); - const { data: users = [], isLoading } = useQuery({ + const { data: users = [], isLoading, isError, error } = useQuery({ queryKey: ["admin-users"], queryFn: adminGetUsers, + retry: 1, }); const [showForm, setShowForm] = useState(false); @@ -71,6 +72,11 @@ export default function AdminUsersPage() { {isLoading ? (

Loading…

+ ) : isError ? ( +

+ Failed to load users:{" "} + {(error as any)?.response?.data?.detail ?? (error as any)?.message ?? "Unknown error"} +

) : (