PageSourceSearch

https://letsken.com/_next/static/chunks/pages/confirm-login-code-c602b22d5c9e7055.js

js letsken.com collected 2026-10-07 23:01:48 UTC 5,469 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8328],{1107:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/confirm-login-code",function(){return n(2100)}])},2077:function(e,t,n){"use strict";var r=n(5893),i=n(7294),s=n(1664),o=n.n(s),a={primary:"disabled:opacity-50 inline-flex whitespace-nowrap justify-center rounded-md border border-transparent shadow-sm bg-pink font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-pink sm:w-auto",secondary:"disabled:opacity-50 inline-flex whitespace-nowrap items-center justify-center border-2 border-gray-200 rounded-md font-medium text-pink bg-white focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-pink",white:"disabled:opacity-50 inline-flex whitespace-nowrap items-center justify-center border border-pink rounded-md font-medium text-pink bg-white focus:outline-none focus:ring-2 focus:ring-white",delete:"disabled:opacity-50 inline-flex whitespace-nowrap justify-center rounded-md border border-transparent shadow-sm bg-red-600 font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-red-500 sm:w-auto",plain:"disabled:opacity-50 whitespace-nowrap justify-center rounded-md border border-transparent font-medium text-white focus:outline-none focus:ring-2 focus:ring-white sm:w-auto",plain2:"disabled:opacity-50 whitespace-nowrap justify-center rounded-md border border-transparent font-medium text-pink focus:outline-none focus:ring-2 focus:ring-white sm:w-auto hover:bg-gray-100"},c={sm:"py-1 px-2 italic text-sm",md:"pt-3 pb-2.5 px-4",lg:"py-2 px-4 italic",xl:"py-2 px-4 italic sm:text-xl sm:py-3 sm:px-6"},d=i.forwardRef((function(e,t){var n=e.size,i=void 0===n?"sm":n,s=e.type,d=void 0===s?"secondary":s,l=e.title,u=e.active,m=e.disabled,p=e.children,f=e.onClick,h=e.href,x=e.target,g=e.className,b=[a[d],c[i],g];return u&&"plain"===d?b.push("bg-white","text-blue"):u&&"plain2"===d&&b.push("!bg-pink","text-white"),h?(0,r.jsx)(o(),{href:h,children:(0,r.jsx)("a",{ref:t,target:x,title:l,className:b.join(" "),children:p})}):(0,r.jsx)("button",{ref:t,title:l,className:b.join(" "),onClick:f,disabled:m,children:p})}));t.Z=d},2958:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),i=n(1163),s=n.n(i),o=n(8100);function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirectTo,n=void 0!==t&&t,i=e.redirectIfFound,a=void 0!==i&&i,c=(0,o.ZP)("/api/user"),d=c.data,l=c.mutate;return(0,r.useEffect)((function(){n&&d&&(n&&!a&&!(null===d||void 0===d?void 0:d.isLoggedIn)||a&&(null===d||void 0===d?void 0:d.isLoggedIn))&&s().push(n)}),[d,a,n]),{user:d,mutateUser:l}}},2100:function(e,t,n){"use strict";n.r(t);var r=n(7568),i=n(4051),s=n.n(i),o=n(5893),a=n(7294),c=n(34),d=n(2958),l=n(1163),u=n(2077),m=n(9008),p=n.n(m),f=n(1664),h=n.n(f);t.default=function(e){var t,n=(0,l.useRouter)().query.returnTo,i=(0,d.Z)({redirectTo:n?"/"+n:"/dashboard",redirectIfFound:!0}).mutateUser,m=(0,a.useState)(""),f=m[0],x=m[1],g=(0,a.useState)(!1),b=g[0],w=g[1],v=(0,a.useRef)();function y(){return(y=(0,r.Z)(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,i((0,c.Z)("/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:t.currentTarget.code.value.trim()})}));case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(1),console.error("An unexpected error happened:",e.t0),x(e.t0.data.message);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}return t=f?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{className:"text-center px-12 pt-12 text-pink font-semibold",children:f}),(0,o.jsx)("div",{className:"text-center pb-12 mt-7",children:(0,o.jsx)(u.Z,{type:"primary",size:"lg",href:"/login".concat(n?"?returnTo="+n:""),children:"Go back"})})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"px-12 mt-8",children:(0,o.jsx)("input",{ref:v,type:"text",name:"code",id:"code",className:"text-center w-full block shadow-sm focus:ring-blue focus:border-blue border-slate-300 rounded-md",autoComplete:"off",placeholder:"Enter login code",onChange:function(){var e=v.current.value.trim().length;w(Boolean(32===e||36===e))}})}),(0,o.jsx)("div",{className:"text-center pb-12 mt-7",children:(0,o.jsx)(u.Z,{type:"primary",size:"lg",disabled:!b,children:"Sign in"})})]}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p(),{children:(0,o.jsx)("title",{children:"Confirm login code / Ken"})}),(0,o.jsx)("div",{className:"min-h-screen bg-blue overflow-auto",children:(0,o.jsxs)("div",{className:"max-w-xl mx-auto pb-14",children:[(0,o.jsx)("div",{className:"text-center",children:(0,o.jsx)(h(),{href:"/",children:(0,o.jsx)("a",{className:"mt-20 inline-block",children:(0,o.jsx)("img",{className:"w-40 inline-block",src:"/images/ken-logo-white.svg",alt:"Ken"})})})}),(0,o.jsxs)("div",{className:"mx-6 mt-14 bg-white mb-8 rounded-md",children:[(0,o.jsx)("img",{className:"w-20 pt-12 block mx-auto",src:"/images/key.svg"}),(0,o.jsxs)("form",{onSubmit:function(e){return y.apply(this,arguments)},children:[(0,o.jsx)("h1",{className:"text-center mt-8",children:"Check your emails"}),(0,o.jsx)("p",{className:"mx-6 mt-4 text-center",children:"Check your spam folder too. Copy the login code and paste it here."}),t]})]})]})})]})}}},function(e){e.O(0,[1664,9774,2888,179],(function(){return t=1107,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.