diff --git a/client/pages/Admin.tsx b/client/pages/Admin.tsx index 29de628c..25e827a0 100644 --- a/client/pages/Admin.tsx +++ b/client/pages/Admin.tsx @@ -89,17 +89,21 @@ export default function Admin() { const [applicationsLoading, setApplicationsLoading] = useState(false); const [selectedMemberId, setSelectedMemberId] = useState(null); - useEffect(() => { - (async () => { - try { - const list = await aethexUserService.listProfiles(50); - setManagedProfiles(list); - } catch (error) { - console.warn("Failed to load managed profiles:", error); - setManagedProfiles([]); - } - })(); + const loadProfiles = useCallback(async () => { + try { + const list = await aethexUserService.listProfiles(200); + setManagedProfiles(list); + } catch (error) { + console.warn("Failed to load managed profiles:", error); + setManagedProfiles([]); + } + }, []); + useEffect(() => { + loadProfiles().catch(() => undefined); + }, [loadProfiles]); + + useEffect(() => { fetch("/api/featured-studios") .then((r) => (r.ok ? r.json() : [])) .then((data) => {