PageSourceSearch

https://spreadthemagic.ai/assets/AdminGuard-DbdvfaMl.js

js spreadthemagic.ai collected 2026-10-05 15:01:13 UTC 961 bytes, 1 lines download raw bytes

1import{ab as i,r as c,j as e}from"./index-B2wrSxfc.js";import{u as o,L as m,S as d}from"./useAdminAuth-CF6kL_2D.js";import"./client-CCqjQxUl.js";const f=({children:r})=>{const{loading:s,session:t,isAdmin:n}=o(),a=i();return c.useEffect(()=>{!s&&!t&&a("/admin/login",{replace:!0})},[s,t,a]),s?e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:e.jsx(m,{className:"h-6 w-6 animate-spin text-magic-pink"})}):t?n?e.jsx(e.Fragment,{children:r}):e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-background px-6 text-center",children:[e.jsx(d,{className:"h-10 w-10 text-magic-pink"}),e.jsx("h1",{className:"font-display text-2xl font-bold text-foreground",children:"Access not granted"}),e.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:"This page is restricted to admin users. Ask an administrator to grant your account access."})]}):null};export{f as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.