PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/admin/club/paypal/cancel-269af82ac7942e6b.js

js codedex.io collected 2026-09-25 14:55:08 UTC 3,527 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2287],{84189:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/club/paypal/cancel",function(){return t(63370)}])},63370:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return u}});var i=t(82729),l=t(85893),a=t(67294),s=t(19521),c=t(99428),r=t(73857),o=t(99281);function _templateObject(){let e=(0,i._)(['\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  height: 100vh;\n\n  font-family: "Mulish", sans-serif;\n  color: ',';\n\n  h1 {\n    font-family: "PixelGridM", sans-serif;\n    font-size: 24px;\n    margin-bottom: 4rem;\n  }\n  .email-fetcher {\n    gap: 1rem;\n  }\n\n  .input-container {\n    display: flex;\n    gap: 2rem;\n    font-size: 16px;\n\n    label {\n      display: flex;\n      flex-direction: column;\n      gap: 0.5rem;\n    }\n\n    .email-fetcher {\n      display: flex;\n      flex-flow: column;\n\n      button {\n        font-weight: bold;\n      }\n    }\n  }\n\n  div.block {\n    display: flex;\n    flex-direction: column;\n    gap: 1rem;\n    font-size: 16px;\n\n    label {\n      display: flex;\n      flex-direction: column;\n      gap: 0.5rem;\n    }\n\n    button {\n      font-weight: bold;\n    }\n    img {\n      margin-bottom: 1.5rem;\n    }\n  }\n\n  .response-container {\n    margin-top: 2rem;\n  }\n']);return _templateObject=function(){return e},e}let d=s.default.div.withConfig({componentId:"sc-63474a9b-0"})(_templateObject(),e=>e.theme.colors.text1);var u=!0;n.default=function(){let[e,n]=(0,a.useState)(""),[t,i]=(0,a.useState)(null),[u,m]=(0,a.useState)(!1),[f,p]=(0,a.useState)(""),[h,x]=(0,a.useState)(!1),b=(0,a.useContext)(s.ThemeContext),j=(0,a.useCallback)(async n=>{try{n.preventDefault(),m(!0);let t=await fetch("/api/admin/club/paypal/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})});if(t.ok){let e=await t.json();"ok"===e.message?x(!0):i("Error cancelling subscription: "+e.message),m(!1)}}catch(e){i("An error occurred while cancelling the subscription")}},[e]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{}),(0,l.jsxs)(d,{children:[(0,l.jsx)("h1",{children:"Cancel PayPal Subscription"}),(0,l.jsxs)("div",{className:"input-container",children:[(0,l.jsxs)("div",{className:"email-fetcher",children:[(0,l.jsxs)("label",{htmlFor:"unique-username",children:["Username to find email",(0,l.jsx)(o.Z,{type:"text",placeholder:"username",value:f,setValue:p})]}),(0,l.jsx)(r.Z,{onClick:async()=>{let e=await fetch("/api/admin/certificates/getEmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uniqueUsername:f})}),t=await e.json();"success"===t.status?n(t.email):(i("User not found"),n(""))},children:"Find email"})]}),(0,l.jsxs)("div",{className:"block",children:[(0,l.jsxs)("label",{htmlFor:"email-address",children:["User email",(0,l.jsx)(o.Z,{type:"email",name:"email-address",placeholder:"email",id:"email-address",value:e,setValue:n})]}),(0,l.jsx)(r.Z,{onClick:j,variant:"red",children:"Cancel subscription"})]})]}),(0,l.jsx)("div",{className:"response-container",children:u?(0,l.jsx)("p",{children:"Loading..."}):h?(0,l.jsxs)("p",{style:{color:b.colors.semantic.text.accent.green},children:["Successfully cancelled subscription for ",e]}):(0,l.jsx)(l.Fragment,{children:t&&(0,l.jsx)("p",{children:t})})})]}),";"]})}}},function(e){e.O(0,[1272,8700,4153,1622,9280,9428,9774,2888,179],function(){return e(e.s=84189)}),_N_E=e.O()}]);

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.