(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4772],{8558:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/email-verification",function(){return i(85004)}])},85004:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return o},default:function(){return d}});var s=i(828),t=i(85893),a=i(67294),l=(i(9008),i(95264)),c=i(86729),r=i(56217),o=!0;function d(e){var n=e.user,i=e.verified,o=(0,s.Z)(a.useState(!1),2),d=o[0],u=o[1],m=(0,s.Z)(a.useState(null),2),f=m[0],h=m[1];return i?(a.useEffect((function(){try{setTimeout((function(){window.location.pathname="/admin"}),2e3)}catch(e){(0,c.Z)("/api/admin/clientError",{method:"post",body:{component:"email-verification/index-page-component/lines-72-74",message:e.message,user:n}}),window.location.pathname="/logout"}}),[]),(0,t.jsx)(r.Z,{head:(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)("title",{children:"Verify Email Address"}),(0,t.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:n,children:(0,t.jsx)("main",{className:"flex items-center justify-center w-full p-8",children:(0,t.jsx)("div",{className:"login-block gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("img",{src:"/images/checkmark.svg",alt:"check-mark",width:30}),(0,t.jsx)("span",{className:"text-xl",children:"Email Verification Successfull!"})]})})})})):(0,t.jsx)(a.Fragment,{children:(0,t.jsx)(r.Z,{head:(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)("title",{children:"Verify Email Address"}),(0,t.jsx)("meta",{name:"description",content:"Verify your email address"})]}),user:n,children:(0,t.jsx)("main",{className:"flex flex-col items-center p-8 justify-center w-full",children:(0,t.jsxs)("div",{className:"login-block gap-2 flex-col max-w-lg",children:[f&&(0,t.jsx)("div",{className:f.class+" w-full rounded py-2 px-4 flex justify-center",children:f.msg}),d&&(0,t.jsx)(l.Z,{position:"absolute"}),(0,t.jsx)("h1",{className:"text-2xl m-0 ",children:"Verify Email Address"}),(0,t.jsx)("span",{children:"Please click the button below to send verification link"}),(0,t.jsx)("button",{className:"w-full",onClick:function(e){e.preventDefault(),u(!0),(0,c.Z)("/api/sendEmailVerificationLink").then((function(e){u(!1),e.success&&h({msg:"Email Sent. Please check mailbox",class:"bg-emerald-100"})}))},children:(0,t.jsx)("span",{children:"Send Verification Link"})}),(0,t.jsx)("button",{className:"w-full outlined",onClick:function(e){window.history.back()},children:(0,t.jsx)("span",{children:"Go Back"})})]})})})})}}},function(e){e.O(0,[9774,2888,179],(function(){return n=8558,e(e.s=n);var n}));var n=e.O();_N_E=n}]);