PageSourceSearch

https://founder-spark-63.lovable.app/assets/FixReceipt-_Y4xeQ_6.js

js founder-spark-63.lovable.app collected 2026-10-03 03:33:00 UTC 3,500 bytes, 1 lines download raw bytes

1import{j as e}from"./query-_koPiPsI.js";import{k as f,r as i,L as c}from"./react-vendor-h1rQ_Bae.js";import{s as h,L as j,S as g,k as _,C as n,n as l,o,p as x}from"./index-Dq2zLArw.js";import{A as b}from"./arrow-up-right-DgLfBzug.js";import"./ui-radix-CKwvnS8F.js";import"./supabase-DL6nu9mS.js";import"./charts-Xu79y1bN.js";import"./motion-nVmI7L5T.js";function F(){const{slug:s}=f(),[t,d]=i.useState(null),[u,p]=i.useState(!0);if(i.useEffect(()=>{s&&(async()=>{const{data:a}=await h.from("fix_receipts").select("slug, engine, fix_type, target_url, problem_summary, fix_summary, before_snapshot, after_snapshot, before_score, after_score, status, verified_at, created_at").eq("slug",s).eq("is_public",!0).maybeSingle();d(a),p(!1)})()},[s]),i.useEffect(()=>{if(!t)return;document.title=`Fix Receipt · ${t.fix_type} · ThoughtForge`;const a=document.querySelector('meta[name="description"]');a&&a.setAttribute("content",t.problem_summary.slice(0,155))},[t]),u)return e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(j,{className:"h-6 w-6 animate-spin"})});if(!t)return e.jsxs("div",{className:"max-w-2xl mx-auto p-8 text-center space-y-3",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Receipt not found"}),e.jsx("p",{className:"text-muted-foreground",children:"This fix may have been unpublished by its author."}),e.jsx(c,{to:"/",className:"text-primary underline underline-offset-4",children:"Back to ThoughtForge"})]});const r=(t.after_score??0)-(t.before_score??0);return e.jsxs("div",{className:"max-w-3xl mx-auto p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(g,{className:"h-4 w-4 text-primary"}),e.jsx("span",{children:"ThoughtForge Fix Receipt"}),e.jsx(_,{variant:"outline",className:"ml-auto",children:t.engine.replace(/_/g," ")})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight",children:t.fix_type.replace(/_/g," ")}),t.target_url&&e.jsxs("a",{href:t.target_url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary inline-flex items-center gap-1 mt-1",children:[new URL(t.target_url).hostname," ",e.jsx(b,{className:"h-3 w-3"})]})]}),t.before_score!==null&&t.after_score!==null&&e.jsx(n,{children:e.jsxs(l,{className:"p-6 flex items-center justify-around",children:[e.jsx(m,{label:"Before",value:t.before_score}),e.jsx("div",{className:`text-2xl font-bold ${r>0?"text-emerald-600":"text-muted-foreground"}`,children:r>0?`+${r}`:r}),e.jsx(m,{label:"After",value:t.after_score})]})}),e.jsxs(n,{children:[e.jsx(o,{children:e.jsx(x,{className:"text-base",children:"What was broken"})}),e.jsx(l,{children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.problem_summary})})]}),e.jsxs(n,{children:[e.jsx(o,{children:e.jsx(x,{className:"text-base",children:"What we changed"})}),e.jsx(l,{children:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.fix_summary})})]}),e.jsxs("div",{className:"text-xs text-muted-foreground text-center pt-4 border-t",children:["Generated ",new Date(t.created_at).toLocaleDateString()," ·"," ",e.jsx(c,{to:"/",className:"text-primary underline",children:"Get ThoughtForge for your brand"})]})]})}function m({label:s,value:t}){return e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:s}),e.jsx("div",{className:"text-3xl font-bold",children:t})]})}export{F 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.