{"version":3,"file":"CheckAndRedirect.BoMo4NDe.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/6YxyBSADeyKaP71R3RZv/yvRvvuKJfO7LWGI6LzoR/CheckAndRedirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function CheckAndRedirect({url,domain}){const ref=useRef();useEffect(()=>{console.log(window.location.hostname);if(window.location.hostname.includes(\"framercanvas.com\")){return;}const storedValue=localStorage.getItem(\"caseStudyViewed\");if(storedValue){const storedDate=new Date(storedValue);const currentDate=new Date;const timeDifference=currentDate.getTime()-storedDate.getTime();const hoursDifference=timeDifference/(1e3*3600);if(hoursDifference>=24){localStorage.removeItem(\"caseStudyViewed\");}else{ref.current.click();}}else{}},[]);return /*#__PURE__*/_jsx(\"a\",{ref:ref,href:domain+\"/\"+url});}// Property Controls for Framer\naddPropertyControls(CheckAndRedirect,{url:{title:\"URL\",type:ControlType.String,defaultValue:\"\"},domain:{title:\"Domain\",type:ControlType.String,defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CheckAndRedirect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckAndRedirect.map"],"mappings":"kTAAmI,SAAwB,EAAiB,CAAC,MAAI,UAAQ,CAAC,IAAM,EAAIA,GAAQ,CAA+d,OAA9d,MAAc,CAAuC,GAAtC,QAAQ,IAAI,EAAO,SAAS,SAAS,CAAI,EAAO,SAAS,SAAS,SAAS,mBAAmB,CAAE,OAAQ,IAAM,EAAY,aAAa,QAAQ,kBAAkB,CAAC,GAAG,EAAY,CAAC,IAAM,EAAW,IAAI,KAAK,EAAY,EAAmB,IAAI,MAAI,CAAkC,SAAS,CAAC,EAAW,SAAS,GAAuC,IAAI,OAA0B,GAAI,aAAa,WAAW,kBAAkB,CAAO,EAAI,QAAQ,OAAO,GAAW,EAAE,CAAC,CAAqB,EAAK,IAAI,CAAK,MAAI,KAAK,EAAO,IAAI,EAAI,CAAC,sBAA3rB,IAAoC,IAAoD,CACnI,EAAoB,EAAiB,CAAC,IAAI,CAAC,MAAM,MAAM,KAAK,EAAY,OAAO,aAAa,GAAG,CAAC,OAAO,CAAC,MAAM,SAAS,KAAK,EAAY,OAAO,aAAa,GAAG,CAAC,CAAC"}