PageSourceSearch

https://goexpired.com/assets/Notifications-B9DGCFog.js

js goexpired.com collected 2026-10-09 22:42:36 UTC 2,641 bytes, 1 lines download raw bytes

1import{c as f,r as l,s as d,bc as h,j as e,G as p,aG as b,au as g,h as j}from"./index-DocTL6Xp.js";const s={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#C96442",accentDark:"#B25438",border:"#E8E5DD",borderStrong:"#D8D3C5"},k=()=>{const c=f(),[n,o]=l.useState(null),[x,m]=l.useState(!1);l.useEffect(()=>{d.auth.getSession().then(({data:{session:a}})=>{a!=null&&a.user?o(a.user):c("/public-pricing",{replace:!0}),m(!0)});const{data:t}=d.auth.onAuthStateChange((a,r)=>{o((r==null?void 0:r.user)??null),r!=null&&r.user||c("/public-pricing",{replace:!0})});return()=>t.subscription.unsubscribe()},[c]);const{notifications:i,markAsRead:u}=h(n);return l.useEffect(()=>{const t=i.filter(a=>!a.is_read).map(a=>a.id);t.length>0&&u(t)},[i,u]),!x||!n?e.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Loading…"}):e.jsxs("div",{className:"flex flex-col",style:{backgroundColor:s.bg,minHeight:"100vh"},children:[e.jsx("title",{children:"Notifications | GoExpired"}),e.jsx(p,{}),e.jsx("main",{className:"flex-1",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(b,{className:"w-6 h-6"}),e.jsx("h1",{className:"text-2xl font-semibold",children:"Notifications"})]}),i.length===0?e.jsx("div",{className:"border border-border rounded-lg p-8 text-center text-muted-foreground",style:{backgroundColor:s.surface},children:"You have no notifications yet."}):e.jsx("ul",{className:"space-y-3",children:i.map(t=>e.jsx("li",{className:"border border-border rounded-lg p-4",style:{backgroundColor:s.surface},children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[!t.is_read&&e.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#2563EB"}}),e.jsx("h2",{className:"text-base font-medium",children:t.title})]}),e.jsx("p",{className:"text-sm mt-2 whitespace-pre-wrap",style:{color:s.inkMuted},children:t.body}),t.link_url&&e.jsx("a",{href:t.link_url,target:t.link_url.startsWith("http")?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>{d.from("notification_clicks").insert({notification_id:t.id,user_id:n.id}).then(()=>{})},className:"inline-flex items-center gap-1 text-sm mt-3 hover:underline",style:{color:"#2563EB"},children:"Read more"})]}),e.jsx("span",{className:"text-xs whitespace-nowrap",style:{color:s.inkMuted},children:g(new Date(t.created_at),{addSuffix:!0})})]})},t.id))})]})}),e.jsx(j,{})]})};export{k as default};

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.