PageSourceSearch

https://venli.ai/assets/useAuth-CNFG4pnh.js

js venli.ai collected 2026-10-05 13:14:19 UTC 771 bytes, 1 lines download raw bytes

1import{r as o}from"./index-DIZaCY_y.js";import{b as l}from"./supabase-DgPCwmhx.js";function d(){const[c,n]=o.useState(null),[i,s]=o.useState(null),[f,a]=o.useState(!0);return o.useEffect(()=>{let r=!0,u;u=setTimeout(()=>{r&&(console.warn("Auth check timed out, assuming no session"),a(!1))},5e3),l.auth.getSession().then(({data:{session:e},error:t})=>{r&&(clearTimeout(u),t&&console.error("Error getting session:",t),n(e),s((e==null?void 0:e.user)??null),a(!1))}).catch(e=>{r&&(clearTimeout(u),console.error("Error in getSession:",e),a(!1))});const{data:{subscription:m}}=l.auth.onAuthStateChange((e,t)=>{r&&(clearTimeout(u),n(t),s((t==null?void 0:t.user)??null),a(!1))});return()=>{r=!1,clearTimeout(u),m.unsubscribe()}},[]),{session:c,user:i,loading:f}}export{d 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.