Load managed profiles from Supabase
cgen-f9c94754502344f6b499097221ce3b0e
This commit is contained in:
parent
ddedd7bdbe
commit
5897559b4b
1 changed files with 9 additions and 10 deletions
|
|
@ -59,17 +59,16 @@ export default function Admin() {
|
|||
]);
|
||||
|
||||
useEffect(() => {
|
||||
try {
|
||||
if (!isSupabaseConfigured) {
|
||||
ensureDemoSeed();
|
||||
const list = JSON.parse(localStorage.getItem("demo_profiles") || "[]");
|
||||
setDemoProfiles(Array.isArray(list) ? list : []);
|
||||
} else {
|
||||
setDemoProfiles([]);
|
||||
(async () => {
|
||||
try {
|
||||
const list = await aethexUserService.listProfiles(50);
|
||||
setManagedProfiles(list);
|
||||
} catch (error) {
|
||||
console.warn("Failed to load managed profiles:", error);
|
||||
setManagedProfiles([]);
|
||||
}
|
||||
} catch {
|
||||
setDemoProfiles([]);
|
||||
}
|
||||
})();
|
||||
|
||||
fetch("/api/featured-studios")
|
||||
.then((r) => (r.ok ? r.json() : []))
|
||||
.then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue