PageSourceSearch

https://goexpired.com/assets/Watchlist-Bb5mxdW3.js

js goexpired.com collected 2026-10-09 22:43:07 UTC 8,786 bytes, 1 lines download raw bytes

1import{u as F,c as E,r as m,j as e,G as w,S,L,g as $,C as M,E as _,h as A,s as B}from"./index-DocTL6Xp.js";import{u as D}from"./useWatchlist-DnFwqyIo.js";import{T}from"./trash-2-Bcoczq4e.js";const t={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#C96442",border:"#E8E5DD",borderStrong:"#D8D3C5"};function W(a){if(!a)return"—";const l=new Date(a).getTime()-Date.now();if(l<=0)return"Expired";const n=Math.floor(l/864e5),i=Math.floor(l%864e5/36e5),c=Math.floor(l%36e5/6e4);return n>0?`${n}d ${i}h ${c}m`:`${i}h ${c}m`}function I(a){const l=a.domain.split("."),n=l[0],i=l.slice(1).join(".").toLowerCase(),c=a.formatted_domain&&a.formatted_domain.toLowerCase()===n.toLowerCase()?a.formatted_domain:n.charAt(0).toUpperCase()+n.slice(1).toLowerCase();return i?`${c}.${i}`:c}function U(){const{user:a,isLoading:l}=F(),{items:n,loading:i,removeById:c,reload:R}=D(a),g=E(),[u,k]=m.useState("active"),[p,y]=m.useState(null),[,j]=m.useState(0);m.useEffect(()=>{document.title="Your Watchlist - GoExpired.com"},[]),m.useEffect(()=>{const s=setInterval(()=>j(o=>o+1),3e4);return()=>clearInterval(s)},[]),m.useEffect(()=>{let s=!1;if(!a||n.length===0){y(new Set);return}return(async()=>{const d=n.map(h=>h.domain),{data:f,error:r}=await B.from("expired_auctions_hot").select("domain").in("domain",d);if(!s){if(r){console.error("watchlist: failed to load live hot domains",r),y(new Set);return}y(new Set((f||[]).map(h=>h.domain.toLowerCase())))}})(),()=>{s=!0}},[a==null?void 0:a.id,n]);const x=m.useMemo(()=>{const s=[],o=[],d=[],f=Date.now();return n.forEach(r=>{const h=r.end_time?new Date(r.end_time).getTime():0,v=!h||h<=f,N=r.source_table==="expired_auctions_hot",C=p==null?void 0:p.has(r.domain.toLowerCase());v?o.push(r):N&&p&&!C?d.push(r):s.push(r)}),{active:s,expired:o,removed:d}},[n,p]),b={active:x.active,expired:x.expired,removed:x.removed}[u];return!l&&!a?e.jsxs("div",{style:{backgroundColor:t.bg,color:t.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen",children:[e.jsx(w,{}),e.jsx("section",{className:"max-w-3xl mx-auto px-6 md:px-8 pt-20 md:pt-28 pb-20",children:e.jsxs("div",{className:"rounded-3xl p-8 md:p-12",style:{backgroundColor:t.surface,border:`1px solid ${t.border}`},children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs mb-6",style:{backgroundColor:t.bg,border:`1px solid ${t.border}`,color:t.inkMuted},children:[e.jsx(S,{className:"w-3 h-3",style:{color:"#2563EB"}}),"Free with any account"]}),e.jsx("h1",{className:"text-4xl md:text-5xl leading-tight mb-5",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"Never miss an auction you care about."}),e.jsx("p",{className:"text-lg leading-relaxed mb-6",style:{color:t.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:"The Watchlist lets you track the exact auctions you're interested in - all in one place. Star a domain on the front page and it shows up here, with the time left, status, and a direct link to bid. Soon we'll also send you email alerts 12 hours and 1 hour before each auction ends, so you never miss a deadline again."}),e.jsxs("ul",{className:"space-y-2 text-sm mb-8",style:{color:t.ink},children:[e.jsx("li",{children:"• Track active auctions in real time"}),e.jsx("li",{children:"• See what expired and what was renewed by the owner"}),e.jsx("li",{children:"• Email alerts before auction end (coming soon)"}),e.jsx("li",{children:"• 100% free with any account"})]}),e.jsx("p",{className:"text-sm mb-8",style:{color:t.inkMuted},children:"Tracking is tied to your account - so we need you signed in to make it work."}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx("button",{onClick:()=>g("/auth"),className:"px-6 py-3 rounded-full text-sm font-medium transition-colors",style:{backgroundColor:"#2563EB",color:"#FFFFFF"},children:"Create free account"}),e.jsx("button",{onClick:()=>g("/auth"),className:"px-6 py-3 rounded-full text-sm font-medium transition-colors",style:{backgroundColor:"transparent",border:`1px solid ${t.borderStrong}`,color:t.ink},children:"Sign in"})]}),e.jsx("p",{className:"text-xs mt-6",style:{color:t.inkMuted},children:"Already trusted by 1,900+ domain investors worldwide."})]})})]}):e.jsxs("div",{style:{backgroundColor:t.bg,color:t.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen",children:[e.jsx(w,{}),e.jsxs("main",{children:[e.jsxs("section",{className:"max-w-6xl mx-auto px-6 md:px-8 pt-16 md:pt-20 pb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl leading-tight mb-3",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"Your Watchlist"}),e.jsx("p",{className:"text-base md:text-lg",style:{color:t.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:"Track the auctions that matter to you in one place and get email alerts before they end, so you never miss a bidding deadline."})]}),e.jsxs("section",{className:"max-w-6xl mx-auto px-6 md:px-8 pb-20",children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:[{key:"active",label:`Active (${x.active.length})`},{key:"expired",label:`Expired (${x.expired.length})`},{key:"removed",label:`Renewed / removed (${x.removed.length})`}].map(s=>{const o=u===s.key;return e.jsx("button",{onClick:()=>k(s.key),className:"px-4 py-2 rounded-full text-sm font-medium transition-colors",style:{backgroundColor:o?"#2563EB":"transparent",color:o?"#FFFFFF":t.ink,border:`1px solid ${o?"#2563EB":t.borderStrong}`},children:s.label},s.key)})}),i?e.jsx("div",{className:"text-sm",style:{color:t.inkMuted},children:"Loading your watchlist…"}):b.length===0?e.jsxs("div",{className:"rounded-2xl p-8 text-center text-sm",style:{backgroundColor:t.surface,border:`1px solid ${t.border}`,color:t.inkMuted},children:[u==="active"&&e.jsxs(e.Fragment,{children:["You're not tracking any active auctions yet."," ",e.jsx(L,{to:"/",className:"underline",style:{color:"#2563EB"},children:"Browse auction listings"})," ","and click the star on any auction to add it here."]}),u==="expired"&&"No expired auctions in your watchlist yet.",u==="removed"&&"No auctions have been removed (renewed by owner) yet."]}):e.jsx("div",{className:"rounded-2xl overflow-hidden",style:{backgroundColor:t.surface,border:`1px solid ${t.border}`},children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",style:{borderCollapse:"separate",borderSpacing:0},children:[e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:"#F5F2EA",color:t.inkMuted},children:["Domain","Status / Time left","Added",""].map((s,o)=>e.jsx("th",{className:"px-4 py-3 text-xs font-medium uppercase tracking-wider whitespace-nowrap",style:{textAlign:o===0?"left":o===3?"right":"left",borderBottom:`1px solid ${t.border}`},children:s},o))})}),e.jsx("tbody",{children:b.map((s,o)=>{const d=s.auction_url||$(s.domain,s.source_type,null),r={borderBottom:o===b.length-1?"none":`1px solid ${t.border}`};return e.jsxs("tr",{className:"transition-colors",children:[e.jsx("td",{className:"px-4 py-3",style:r,children:e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{fontWeight:600,color:"#2563EB"},title:s.domain,children:I(s)})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",style:{...r,color:t.inkMuted},children:u==="removed"?e.jsx("span",{style:{color:t.accent},children:"Removed (likely renewed)"}):e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(M,{className:"w-3.5 h-3.5"}),W(s.end_time)]})}),e.jsx("td",{className:"px-4 py-3 whitespace-nowrap",style:{...r,color:t.inkMuted},children:new Date(s.created_at).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-right whitespace-nowrap",style:r,children:e.jsxs("div",{className:"inline-flex items-center gap-2",children:[e.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-colors",style:{border:`1px solid ${t.borderStrong}`,color:t.ink},children:["View Auction",e.jsx(_,{className:"w-3 h-3"})]}),e.jsx("button",{type:"button",onClick:()=>c(s.id),"aria-label":"Remove from watchlist",title:"Remove from watchlist",className:"inline-flex items-center justify-center rounded-full p-1.5 hover:bg-black/5 transition-colors",style:{color:t.inkMuted},children:e.jsx(T,{className:"w-4 h-4"})})]})})]},s.id)})})]})})}),e.jsx("p",{className:"text-xs mt-8",style:{color:t.inkMuted},children:"Email alerts are now active in beta. You will receive a notification 12 hours and 1 hour before an auction ends. This is a friendly reminder that GoExpired cannot guarantee delivery of every alert, so please keep an eye on your watchlist as well."})]})]}),e.jsx(A,{})]})}
1export{U 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.