PageSourceSearch

https://www.newsletterexamples.co/assets/LoginAction-D5nQvVP1.js

js newsletterexamples.co collected 2026-10-04 03:27:12 UTC 2,703 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="16df7de8-1ffd-5cf3-88a2-ddb9412d59a8")}catch(e){}}();
3import{a as e,t}from"./jsx-runtime-CMgEUHpv.js";import{V as n}from"./dist-CAHjj65Z.js";import{t as r}from"./useTranslation-BymTnaHx.js";import{l as i,n as a}from"./components-B8bHjdou.js";import{t as o}from"./StatusInputs-Bo_bMqPM.js";import{t as s}from"./useToast-aQCYBESc.js";import{t as c}from"./useIsLoggedIn-hXilkn2W.js";import{t as l}from"./usePostSlugRedirect-BUDTYjB0.js";import{t as u}from"./RedirectToHiddenInput-Dv2ZQtf-.js";var d=e(n(),1),f=t(),p=({allowSignup:e=!0,onSuccess:t,hash:n})=>{let p=c(),m=l(),h=i(),g=h.data,_=h.state===`submitting`,{t:v}=r();if((0,d.useEffect)(()=>{localStorage.removeItem(`signup_redirects`)},[]),s(g?.toast,t),p)return null;let y=e=>{e.preventDefault();let t=new FormData(e.currentTarget),r=window?.location?.href;n&&(r=`${r}#${n}`),t.append(`redirect_to`,r),t.append(`request_magic_link`,`true`),h.submit(t,{method:`post`,action:`/login`})};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.Form,{method:`post`,action:`/login`,className:`w-full`,onSubmit:e=>y(e),children:(0,f.jsxs)(`div`,{className:`w-full space-y-2 sm:mx-auto sm:flex sm:space-y-0`,children:[(0,f.jsx)(o,{name:`login`,errorMessage:`${v(`errors.default`)} ${v(`errors.try_later`)}`,successMessage:v(`toast.login_link.message`)}),(0,f.jsxs)(`div`,{className:`w-full`,children:[(0,f.jsx)(u,{value:m}),(0,f.jsx)(`input`,{type:`email`,name:`email`,autoComplete:`email`,autoFocus:!0,placeholder:v(`subscribe.email_placeholder`)||``,className:`block w-full rounded border-gray-300 bg-white p-1.5 text-sm font-light text-black placeholder-gray-400 placeholder-gray-600 placeholder:text-sm focus:outline-none sm:rounded-r-none`,required:!0})]}),(0,f.jsx)(`div`,{children:(0,f.jsx)(`input`,{type:`submit`,value:v(_?`login.magic_link_sending`:`login.send_magic_link`)||``,className:`wt-button-font block h-full w-full cursor-pointer rounded border border-transparent bg-wt-primary p-1.5 text-sm font-medium text-wt-text-on-primary transition duration-200 sm:w-fit sm:rounded-l-none`,disabled:_})})]})}),e&&(0,f.jsxs)(`div`,{className:`mt-2 text-xs text-gray-700`,children:[(0,f.jsxs)(`span`,{className:`opacity-75`,children:[v(`login.sign_up_label`),` `]}),(0,f.jsx)(a,{to:`/subscribe`,className:`inline-flex justify-center underline`,children:v(`shared.cta.sign_up`)})]})]})};export{p as t};
4//# sourceMappingURL=LoginAction-D5nQvVP1.js.map
5//# debugId=16df7de8-1ffd-5cf3-88a2-ddb9412d59a8

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.