1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[789],{4657:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/newsletter-subscription",function(){return r(569)}])},569:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return p}});var n=r(5893),s=r(9008),i=r.n(s),o=r(1163),c=r(776),u=r(7294);let a=e=>{let{token:t}=e,[r,s]=(0,u.useState)("pending");return(0,u.useEffect)(()=>{t&&"string"==typeof t&&fetch("".concat("https://api.team-malizia.com","/subscription"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})}).then(e=>{if(!e.ok)throw Error("Subscription failed");console.log("Subscription success"),s("success")}).catch(e=>{console.error("Subscription error:",e),s("error")})},[t]),(0,n.jsx)("div",{className:"mt-8 flex items-center justify-center",children:(0,n.jsx)("div",{className:"text-2xl font-semibold",children:"pending"===r?"Processing your subscription...":"success"===r?"Thank you for subscribing to our newsletter!":"There was an error processing your subscription. Please try again later."})})},l=e=>{let{categoryData:t,footerMenu:r,homepageStory:s}=e,u=(0,o.useRouter)(),{token:l}=u.query;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i(),{children:(0,n.jsx)("title",{children:"Newsletter Subscription"})}),(0,n.jsx)(c.Z,{categoryData:t,footerMenu:r,homepageStory:s,children:(0,n.jsx)(a,{token:l})})]})};var p=l}},function(e){e.O(0,[211,776,774,888,179],function(){return e(e.s=4657)}),_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.