1import{j as e}from"./query-_koPiPsI.js";import{f as m,r as i,L as d}from"./react-vendor-h1rQ_Bae.js";import{f as u,s as l,L as c}from"./index-Dq2zLArw.js";import{C as p,a as x}from"./CaseStudyPublisher-Vw36WQXE.js";import"./ui-radix-CKwvnS8F.js";import"./supabase-DL6nu9mS.js";import"./charts-Xu79y1bN.js";import"./motion-nVmI7L5T.js";import"./message-square-C6C943k8.js";import"./arrow-up-1-Rt-S8S.js";import"./eye-DeaWVGHm.js";import"./collapsible-BqfEIKWx.js";import"./slopDetector-DWJy3eHD.js";function q(){const{user:s,loading:t}=u(),r=m(),[a,n]=i.useState(null);return i.useEffect(()=>{if(!t){if(!s){r("/auth");return}(async()=>{const{data:o}=await l.from("user_roles").select("role").eq("user_id",s.id).eq("role","admin").maybeSingle();n(!!o)})()}},[s,t,r]),t||a===null?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(c,{className:"h-6 w-6 animate-spin"})}):a?e.jsxs("div",{className:"container mx-auto p-6 space-y-6 max-w-6xl",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:"Case Studies"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 max-w-2xl",children:["Captured wins from across the platform and the editor for the published marketing pages at ",e.jsx(d,{to:"/case-studies",className:"underline",children:"/case-studies"}),". Admin-only â never shown to paid users."]})]}),e.jsx(p,{}),e.jsx(x,{})]}):e.jsx("div",{className:"p-8 text-center text-muted-foreground",children:"Admin access required."})}export{q 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.