{"version":3,"file":"shared-lib.yJsErUN7.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/FKFIs8dP8f5T0uT6OLbo/CeyD9M0E8YNPEs0xVQd2/useAuth.js"],"sourcesContent":["import{useState,useEffect}from\"react\";export function useAuth(){const[isLoggedIn,setIsLoggedIn]=useState(false);useEffect(()=>{const checkLogin=async()=>{try{const res=await fetch(\"/api/me\",{method:\"GET\",credentials:\"include\"});try{const json=await res.json();if(res.ok){setIsLoggedIn(true);}else{setIsLoggedIn(false);}}catch(e){setIsLoggedIn(false);}}catch(err){console.error(\"Fetch error:\",err);setIsLoggedIn(false);}};checkLogin();},[]);return isLoggedIn;}\nexport const __FramerMetadata__ = {\"exports\":{\"useAuth\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./useAuth.map"],"mappings":"sIAAsC,SAAgB,GAAS,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAyU,OAAxU,MAAc,EAAkB,SAAS,CAAC,GAAG,CAAC,IAAM,EAAI,MAAM,MAAM,UAAU,CAAC,OAAO,MAAM,YAAY,UAAU,CAAC,CAAC,GAAG,CAAY,MAAM,EAAI,MAAM,CAAI,EAAI,GAAI,EAAc,GAAK,CAAO,EAAc,GAAM,MAAW,CAAC,EAAc,GAAM,QAAS,EAAI,CAAC,QAAQ,MAAM,eAAe,EAAI,CAAC,EAAc,GAAM,KAAgB,EAAG,EAAE,CAAC,CAAQ,mBAAzZ"}