PageSourceSearch

https://johannapardo.de/assets/unsubscribe-DhLNNcN1.js

js johannapardo.de collected 2026-10-07 03:21:24 UTC 2,286 bytes, 1 lines download raw bytes

1import{n as l,r as a,j as e}from"./index-CHfAEzh6.js";function c(){const{token:i}=l({from:"/unsubscribe"}),[n,s]=a.useState({kind:"loading"});a.useEffect(()=>{if(!i){s({kind:"invalid"});return}(async()=>{try{const t=await fetch(`/email/unsubscribe?token=${encodeURIComponent(i)}`),r=await t.json();if(!t.ok){s({kind:"invalid"});return}r?.reason==="already_unsubscribed"?s({kind:"already"}):r?.valid?s({kind:"ready"}):s({kind:"invalid"})}catch{s({kind:"error",message:"Verbindungsfehler."})}})()},[i]);async function d(){s({kind:"submitting"});try{const t=await fetch("/email/unsubscribe",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({token:i})}),r=await t.json();if(!t.ok){s({kind:"error",message:r?.error??"Fehler."});return}s({kind:"done"})}catch{s({kind:"error",message:"Verbindungsfehler."})}}return e.jsxs("section",{className:"mx-auto flex min-h-[60vh] max-w-lg flex-col justify-center px-6 py-16 text-bone",children:[e.jsxs("h1",{className:"font-display text-3xl font-extrabold uppercase",children:["E-Mail abmelden",e.jsx("span",{className:"text-plum-soft",children:"."})]}),e.jsxs("div",{className:"mt-6 rounded-lg border border-plum/30 bg-plum/[0.06] p-6",children:[n.kind==="loading"&&e.jsx("p",{className:"text-sm text-bone/70",children:"Prüfe Link…"}),n.kind==="invalid"&&e.jsx("p",{className:"text-sm text-bone/80",children:"Dieser Abmelde-Link ist ungültig oder abgelaufen."}),n.kind==="already"&&e.jsx("p",{className:"text-sm text-bone/80",children:"Diese E-Mail-Adresse ist bereits abgemeldet."}),n.kind==="ready"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-bone/80",children:"Möchtest du dich wirklich von zukünftigen E-Mails abmelden?"}),e.jsx("button",{onClick:d,className:"mt-5 inline-flex items-center bg-plum-soft px-4 py-2 text-[11px] font-bold uppercase tracking-widest text-aubergine-deep hover:bg-bone",children:"Abmeldung bestätigen"})]}),n.kind==="submitting"&&e.jsx("p",{className:"text-sm text-bone/70",children:"Melde ab…"}),n.kind==="done"&&e.jsx("p",{className:"text-sm text-bone/80",children:"Du wurdest erfolgreich abgemeldet. Wir senden dir keine weiteren E-Mails."}),n.kind==="error"&&e.jsx("p",{className:"text-sm text-destructive",children:n.message})]})]})}export{c as component};

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.