PageSourceSearch

https://stasht.app/assets/Unsubscribe-DU7ExuBz.js

js stasht.app collected 2026-09-24 11:02:06 UTC 4,630 bytes, 2 lines download raw bytes

1import{j as e}from"./query-DzMrwxOc.js";import{k as m,r}from"./router-BNmspi0x.js";import{K as x,E as f}from"./index-NI0RHxq9.js";import"./react-vendor-BFjHA0Wy.js";import"./ui-components-C4kYX3wD.js";import"./radix-ui-5ncyoCxB.js";import"./utilities-BRQWscav.js";import"./icons-and-animation-C-Yc4ku-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"2ecc7e431f5ea99c1855f803165b836ae53c68bb"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="dcd07e4f-1181-4655-85a7-8cc8ecc3cce2",t._sentryDebugIdIdentifier="sentry-dbid-dcd07e4f-1181-4655-85a7-8cc8ecc3cce2")})()}catch{}const w=()=>{const[t]=m(),s=t.get("token"),[n,i]=r.useState(s?"confirm":"invalid"),[l,d]=r.useState(""),[o,c]=r.useState(!1);r.useEffect(()=>{s||(i("invalid"),d("Missing unsubscribe token."))},[s]);const u=r.useCallback(async()=>{if(!(!s||o)){c(!0);try{const a=await x.post(f.NOTIFICATIONS.UNSUBSCRIBE,{token:s},!0);i("success"),d(a.message||"You've been unsubscribed.")}catch(a){i("error"),d(a?.details?.error||a?.message||"This link may have expired. Please check your latest email for a new link.")}finally{c(!1)}}},[s,o]);return e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",style:{paddingTop:"var(--sat)"},children:e.jsxs("div",{className:"max-w-md w-full mx-4",children:[e.jsxs("div",{className:"bg-card rounded-2xl border border-border p-8 text-center space-y-6",children:[e.jsx("p",{className:"text-3xl font-semibold",style:{color:"#eb7633"},children:"Stasht"}),n==="confirm"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Unsubscribe from emails?"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"You'll stop receiving this type of email from Stasht. You can re-enable them anytime in your notification settings."}),e.jsx("button",{onClick:u,disabled:o,className:"w-full py-3 px-6 rounded-full text-white font-semibold text-base transition-opacity disabled:opacity-50",style:{backgroundColor:"#eb7633"},children:o?"Unsubscribing...":"Unsubscribe"}),e.jsx("a",{href:"https://stasht.app",className:"block text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"})]}),n==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:e.jsx("svg",{className:"w-6 h-6 text-green-600 dark:text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"You've been unsubscribed"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:l}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Changed your mind?"," ",e.jsx("a",{href:"https://stasht.app/profile/settings",className:"font-medium",style:{color:"#eb7633"},children:"Manage preferences"})]})]}),n==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:e.jsx("svg",{className:"w-6 h-6 text-red-600 dark:text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Something went wrong"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:l}),e.jsx("a",{href:"https://stasht.app",className:"inline-block py-3 px-6 rounded-full text-white font-semibold text-base",style:{backgroundColor:"#eb7633"},children:"Go to Stasht"})]}),n==="invalid"&&e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Invalid link"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:l||"This unsubscribe link is not val
1id."}),e.jsx("a",{href:"https://stasht.app",className:"inline-block py-3 px-6 rounded-full text-white font-semibold text-base",style:{backgroundColor:"#eb7633"},children:"Go to Stasht"})]})]}),e.jsx("p",{className:"text-center text-xs text-muted-foreground mt-6",children:"Stasht · San Francisco, CA"})]})})};export{w as default};
2//# sourceMappingURL=Unsubscribe-DU7ExuBz.js.map

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.