PageSourceSearch

https://tilnote.io/_next/static/chunks/pages/verify-email/[token]-19ce6c1c37b4b912.js

js tilnote.io collected 2026-09-24 09:36:08 UTC 5,018 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5634],{23628:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/verify-email/[token]",function(){return t(79485)}])},79485:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>x,default:()=>p});var a=t(37876),l=t(14232),r=t(89099),n=t(36438),i=t(16684),c=t(77328),o=t.n(c),d=t(48230),u=t.n(d),h=t(87128),m=t(96599),x=!0;let p=()=>{let{token:e}=(0,r.useRouter)().query,[s,t]=(0,l.useState)({loading:!0,success:!1,message:""}),[c,d]=(0,l.useState)(!1),[x,p]=(0,l.useState)(""),w=(0,l.useCallback)(async()=>{try{let s=await n.A.post("/users/verify-email",{token:e});t({loading:!1,success:!0,message:s.data.message}),s.data.userId&&s.data.userName&&(window.localStorage.setItem("wuser",s.data.userId),window.localStorage.setItem("wname",s.data.userName),(0,m.hq)(),p(s.data.userName),d(!0))}catch(e){t({loading:!1,success:!1,message:e.response?.data?.error||"이메일 인증에 실패했습니다."})}},[e]);return(0,l.useEffect)(()=>{e&&w()},[e,w]),(0,a.jsxs)("div",{children:[(0,a.jsx)(o(),{children:(0,a.jsx)("title",{children:"이메일 인증 - TILNOTE"})}),(0,a.jsx)(i.A,{}),(0,a.jsx)("div",{className:"container",children:(0,a.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[50vh]",children:s.loading?(0,a.jsx)("div",{children:"이메일 인증을 진행중입니다..."}):s.success?(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"이메일 인증 완료"}),(0,a.jsx)("p",{className:"mb-4",children:s.message})]}):(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"이메일 인증 실패"}),(0,a.jsx)("p",{className:"text-red-500 mb-4",children:s.message}),(0,a.jsx)(u(),{href:"/register",children:(0,a.jsx)("button",{className:"btn btn-blue",children:"회원 가입으로 돌아가기"})})]})})}),c&&(0,a.jsx)(h.A,{name:x,handleOpen:d,open:c})]})}},80084:(e,s,t)=>{"use strict";var a=t(29563);s.A=void 0;var l=a(t(94471)),r=t(37876);s.A=(0,l.default)((0,r.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},87128:(e,s,t)=>{"use strict";t.d(s,{A:()=>w});var a=t(37876),l=t(14232),r=t(32937),n=t(18042),i=t(52563),c=t(44997),o=t(6165),d=t(89099),u=t(36438),h=t(31777),m=t(46358),x=t(847);let p={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:350,sm:450,md:500},maxWidth:"90vw",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4},w=({name:e,handleOpen:s,open:t,redirectPath:w=""})=>{let g=(0,d.useRouter)(),b=l.useCallback(()=>{let e=g.locale||"ko";return"ko"===e?"/home":`/${e}/home`},[g.locale]),j=l.useCallback(()=>"string"==typeof w&&w.startsWith("/")?w:b(),[b,w]),f=l.useCallback(()=>{s(!1),g.push(j())},[s,j,g]),[v,N]=l.useState(e),[y,A]=l.useState(""),[k,S]=l.useState(!1),_=(0,h.wA)(),[C,E]=l.useState(!1),{t:L}=(0,x.Bd)("common");l.useEffect(()=>{let s=e.replace(/ /g,"").toLowerCase().slice(0,15);/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(s)||A(s)},[e]);let F=async()=>{if(S(!0),""!==v&&!0===C&&v!==e)try{await u.A.put("/users",{name:v})}catch(e){return e.response?.data?.error&&_(m.setFlash({message:e.response.data.error,type:"warn",timestamp:+new Date})),S(!1),!1}try{if(""!==y){let e=!1;if(/^[a-z0-9-]+$/.test(y)&&y.length<=15&&y.length>=3&&(e=!0),!1===e)return _(m.setFlash({message:L("auth:blogNameValidationError"),type:"warn",timestamp:+new Date})),S(!1),!1;await u.A.post("/users/blogs",{blogName:y}).then(e=>(_(m.setFlash({message:L("auth:welcomeSuccessWithBlog",{name:v}),type:"success",timestamp:+new Date})),g.push(j()),!0)).catch(e=>{if(e.response?.data?.error)return _(m.setFlash({message:e.response.data.error,type:"warn",timestamp:+new Date})),S(!1),!1})}else _(m.setFlash({message:L("auth:welcomeSuccessNoBlog",{name:v}),type:"success",timestamp:+new Date})),S(!1),g.push(j())}catch{S(!1),g.push(j())}};return(0,a.jsx)("div",{children:(0,a.jsx)(c.A,{open:t,onClose:()=>f(),disableScrollLock:!0,children:(0,a.jsxs)(r.A,{sx:p,children:[(0,a.jsx)("h2",{children:L("auth:welcomeTitle",{name:e})}),(0,a.jsx)("div",{children:L("auth:welcomeSubtitle")}),(0,a.jsx)(i.A,{sx:{mt:2,mb:2},children:L("auth:userIdLabel",{name:e})}
1),(0,a.jsx)(o.A,{variant:"outlined",value:v,onChange:e=>{E(!0),N(e.target.value)},fullWidth:!0}),(0,a.jsx)(i.A,{sx:{mt:2,mb:2},children:L("auth:blogNameLabel")}),(0,a.jsxs)("div",{className:"flex-a-center",children:["tilnote.io/",(0,a.jsx)("span",{className:"mr-5",children:"@"}),(0,a.jsx)(o.A,{variant:"outlined",value:y,onChange:e=>A(e.target.value),fullWidth:!0})]}),(0,a.jsxs)("div",{style:{marginTop:"3rem"},children:[(0,a.jsx)(n.A,{style:{width:"50%"},onClick:f,variant:"text",disabled:k,children:L("auth:skipButton")}),(0,a.jsx)(n.A,{style:{width:"50%"},onClick:F,variant:"contained",disabled:k,children:L("auth:confirmButton")})]})]})})})}}},e=>{e.O(0,[8230,8384,4997,4587,8212,304,2289,7559,1494,6165,5870,807,6684,636,6593,8792],()=>e(e.s=23628)),_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.