PageSourceSearch

https://virtualrealityadelaide.com/assets/auth-ImE1wBhl.js

js virtualrealityadelaide.com collected 2026-10-09 22:01:22 UTC 672 bytes, 1 lines download raw bytes

1import{r as u,s as o}from"./index-CqFW9Ffh.js";function p(){const[t,r]=u.useState(null),[l,a]=u.useState([]),[c,f]=u.useState(!0);return u.useEffect(()=>{let s=!0;const i=async e=>{if(!e){s&&a([]);return}const{data:n}=await o.from("user_roles").select("role").eq("user_id",e);s&&a((n??[]).map(m=>m.role))},{data:d}=o.auth.onAuthStateChange((e,n)=>{s&&(r(n),setTimeout(()=>i(n?.user?.id),0))});return o.auth.getSession().then(({data:e})=>{s&&(r(e.session),i(e.session?.user?.id).finally(()=>s&&f(!1)))}),()=>{s=!1,d.subscription.unsubscribe()}},[]),{session:t,user:t?.user??null,roles:l,loading:c}}const S=t=>t.includes("admin")||t.includes("staff");export{S as i,p as u};

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.