PageSourceSearch

https://fantasyhoff.com/assets/MagicLinks-BVrtf3AL.js

js fantasyhoff.com collected 2026-09-24 14:43:27 UTC 3,365 bytes, 1 lines download raw bytes

1import{a as m,j as e}from"./vendor-react-DCIP6ipm.js";import{S as j,a as o}from"./SettingsShell-BEZ5BXBO.js";import{aE as p}from"./index-5SgQjDr9.js";import{adminTabs as f,StatTile as i,UtmCell as g,fmtDateTime as N,timeAgo as b,StatusPill as c}from"./AdminShared-C8GFuuPg.js";import{ay as q}from"./vendor-icons-Cwrlw3JZ.js";import"./vendor-router-DmCJgN2X.js";import"./vendor-react-dom-CpZ_XJmk.js";import"./vendor-query-Brtv2x_Q.js";const l=25;function R(){const[d,h]=m.useState(""),[a,n]=m.useState(0),r=p({q:d||void 0,offset:a}),s=r.data,u=s&&s.total>0?s.offset+1:0,x=s?Math.min(s.offset+l,s.total):0;return e.jsxs(j,{eyebrow:"Master admin",title:"Magic links",description:"Every email that requested a sign-in link. Spot who tried to get in — and who never finished.",icon:e.jsx(q,{size:18}),tabs:f,children:[e.jsx(o,{title:"At a glance",children:e.jsxs("div",{className:"adm-tiles",children:[e.jsx(i,{label:"Unique emails",value:(s==null?void 0:s.summary.emails)??"…"}),e.jsx(i,{label:"Requests (24h)",value:(s==null?void 0:s.summary.requests24h)??"…"}),e.jsx(i,{label:"Requests (7d)",value:(s==null?void 0:s.summary.requests7d)??"…"}),e.jsx(i,{label:"No account yet",value:(s==null?void 0:s.summary.neverConverted)??"…",sub:"Requested a link, never signed up"})]})}),e.jsxs(o,{title:"Requests",children:[e.jsxs("div",{className:"adm-toolbar",style:{marginBottom:14},children:[e.jsx("input",{className:"adm-input",type:"search",placeholder:"Search email…",value:d,onChange:t=>{h(t.target.value),n(0)},"aria-label":"Search magic-link requests"}),e.jsx("div",{className:"spacer"}),e.jsxs("div",{className:"adm-pagination",children:[e.jsxs("span",{children:[u,"–",x," of ",(s==null?void 0:s.total)??"…"]}),e.jsx("button",{type:"button",className:"adm-filter",disabled:a===0,onClick:()=>n(Math.max(0,a-l)),children:"‹ Prev"}),e.jsx("button",{type:"button",className:"adm-filter",disabled:!s||s.offset+l>=s.total,onClick:()=>n(a+l),children:"Next ›"})]})]}),r.isLoading?e.jsx("p",{className:"adm-empty",children:"Loading requests…"}):r.isError?e.jsx("p",{className:"adm-error",children:"Couldn't load requests. Refresh to retry."}):!s||s.requests.length===0?e.jsx("p",{className:"adm-empty",children:"No magic-link requests yet."}):e.jsx("div",{className:"adm-tablewrap",children:e.jsxs("table",{className:"adm-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Email"}),e.jsx("th",{children:"Source"}),e.jsx("th",{children:"Intent"}),e.jsx("th",{children:"Requests"}),e.jsx("th",{children:"First"}),e.jsx("th",{children:"Last"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:s.requests.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("span",{className:"cell-main",children:t.email})}),e.jsx("td",{children:e.jsx(g,{source:t.utmSource,medium:t.utmMedium,campaign:t.utmCampaign})}),e.jsx("td",{children:e.jsx("span",{className:"cell-main",children:t.nextPath??"—"})}),e.jsx("td",{className:"num",children:t.requests}),e.jsx("td",{children:N(t.firstAt)}),e.jsx("td",{children:b(t.lastAt)}),e.jsx("td",{children:e.jsxs("span",{className:"adm-actions",children:[t.hasAccount?e.jsx(c,{kind:"ok",children:"Account"}):e.jsx(c,{kind:"warn",children:"No account yet"}),!t.signedIn&&e.jsx(c,{kind:"idle",children:"Never clicked"})]})})]},t.email))})]})})]})]})}export{R as AdminMagicLinks};

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.