PageSourceSearch

https://www.oddbox.co.uk/component---src-pages-newsletter-js-2cf0448e0f417ad1a62e.js

js oddbox.co.uk collected 2026-10-02 04:16:46 UTC 2,149 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkoddbox=self.webpackChunkoddbox||[]).push([[441],{6377:function(e,t,a){a.r(t);var n=a(7294),s=a(9294),l=a(2861);t.default=()=>{const e=(0,n.useRef)(null),{0:t,1:a}=(0,n.useState)(!1),{0:r,1:i}=(0,n.useState)(""),{0:u,1:o}=(0,n.useState)(!1),{0:c,1:m}=(0,n.useState)(!1),{0:d,1:p}=(0,n.useState)(!1);(0,n.useEffect)((()=>{g(r)?a(!0):a(!1)}),[r]);const g=e=>/^.+@.+\..+$/.test(e);return n.createElement(s.Z,null,n.createElement("section",{className:"container"},n.createElement("div",{className:"newsletter is-centered"},n.createElement("h1",null,"Join the Odd Community"),!u&&n.createElement("div",null,n.createElement("p",null,"Get a big bunch of Odd straight to your inbox each week - including recipes, tips and treats."),n.createElement("div",{className:"form"},n.createElement("input",{ref:e,onChange:e=>{i(e.target.value)},type:"text",name:"",id:"",value:r,placeholder:"Email address",required:!0}),n.createElement("p",{className:"text-small"},"By signing up for the newsletter, you agree to opt into Oddbox General Marketing and Newsletters via Email."),n.createElement("button",{style:{margin:"0 auto"},onClick:()=>{p(!0),(async e=>{const t={event_name:"newsletter_signup",email:e,email_subscribe:"opted_in",email_subscription_groups:{general_marketing:!0,weekly_newsletter:!0,surveys:!0}},a={headers:{"X-API-KEY":"m4GXUxToVF6gKULfU0nG4a7AtXFz1DtX4uh5WXZn"}};try{const e=await l.Z.post("https://lssmtee0hd.execute-api.eu-west-2.amazonaws.com/prod/registration/api/v1/customer/track-alias",t,a);201===e.status?(o(!0),m(!1),p(!1)):(console.log(e),o(!1),m(!0),p(!1))}catch(n){console.error(n)}})(r)},className:"button button-primary",value:"signup",disabled:!t&&"disabled"},d&&n.createElement("div",{className:"loader"}),!d&&n.createElement(n.Fragment,null,"Sign up")))),u&&n.createElement("div",null,n.createElement("p",{className:"underline"},"Thank you for signing up to our newsletter!")),c&&n.createElement("div",null,n.createElement("p",{className:"underline"},"Please ensure you have entered your Email address.")))))}}}]);
2//# sourceMappingURL=component---src-pages-newsletter-js-2cf0448e0f417ad1a62e.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.