Seed demo in Admin page too
cgen-3daac2557a074af8bbab3a6345d6063a
This commit is contained in:
parent
7c94e84f13
commit
b8d43450a8
1 changed files with 2 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import Layout from "@/components/Layout";
|
|||
import LoadingScreen from "@/components/LoadingScreen";
|
||||
import { useAuth } from "@/contexts/AuthContext";
|
||||
import { useEffect } from "react";
|
||||
import { ensureDemoSeed } from "@/lib/demo-feed";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import {
|
||||
Card,
|
||||
|
|
@ -25,6 +26,7 @@ export default function Admin() {
|
|||
const { user, loading, roles } = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const isOwner = Array.isArray(roles) && roles.includes("owner");
|
||||
useEffect(() => { try { ensureDemoSeed(); } catch {} }, []);
|
||||
const demoProfiles: any[] = (function () {
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem("demo_profiles") || "[]");
|
||||
|
|
|
|||
Loading…
Reference in a new issue