"use strict";exports.id=140,exports.ids=[140],exports.modules={95140:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var n=o(75034),a=o(80648),s=o(36938),r=o(91299),c=o(8055),d=o(33757),l=o.n(d);function LastUpdateTime(){let e=(0,s.useRouter)(),[t,o]=(0,r.useState)(0),[d,u]=(0,r.useState)(new Date);return(0,r.useEffect)(()=>{let createSocketConnection=async()=>{let t=(0,c.io)();t.on("connect",()=>{console.log("Watching for updates...")}),t.on("project-updated",l()(()=>{console.log("project updated"),e.refresh(),u(new Date)},500)),t.on("disconnect",()=>{console.log("Stopped watching for updates...")})};createSocketConnection()},[e]),(0,r.useEffect)(()=>{let e=setInterval(()=>{o(t+1),t>60&&clearInterval(e)},1e3);return()=>clearInterval(e)},[t]),n.jsx("div",{className:"text-muted-foreground text-xs",children:`Last updated ${(0,a.Z)(new Date,d)}`})}let u=LastUpdateTime}};