-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
34 changed files
with
829 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
import useFunnel from '@/app/hooks/useFunnel'; | ||
import FindIdForm from '@/app/ui/user/find-id-form/find-id-form'; | ||
import { useState } from 'react'; | ||
import { FormState } from '@/app/ui/view/molecule/form/form-root'; | ||
import FindIdSuccess from './find-id-success'; | ||
|
||
export default function FindIdContainer() { | ||
const { Funnel, setStep } = useFunnel<'form' | 'success'>('form'); | ||
const [authId, setAuthId] = useState<string | undefined>(undefined); | ||
return ( | ||
<div className="p-6"> | ||
<Funnel> | ||
<Funnel.Step name="form"> | ||
<FindIdForm | ||
onNext={(formState?: FormState) => { | ||
if (formState?.value) setAuthId(formState.value.authId); | ||
setStep('success'); | ||
}} | ||
/> | ||
</Funnel.Step> | ||
<Funnel.Step name="success"> | ||
<FindIdSuccess authId={authId} /> | ||
</Funnel.Step> | ||
</Funnel> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Button from '@/app/ui/view/atom/button/button'; | ||
import Link from 'next/link'; | ||
interface FindIdSuccessProps { | ||
authId: string | undefined; | ||
} | ||
export default function FindIdSuccess({ authId }: FindIdSuccessProps) { | ||
return ( | ||
<div className=" flex items-center justify-center px-4 sm:px-6"> | ||
<div className="max-w-md w-full space-y-8"> | ||
<div className="space-y-2"> | ||
<p className="text-gray-500 text-center">입력하신 정보와 일치하는 아이디입니다.</p> | ||
</div> | ||
<div className="p-8 px-20 bg-light-blue-1 text-point-blue rounded-lg text-center">{authId}</div> | ||
<div className="space-y-4"> | ||
<div className="flex justify-center gap-4"> | ||
<Link href="/sign-in"> | ||
<Button size="sm" label={'로그인 하기'} /> | ||
</Link> | ||
<Link href="/find-password"> | ||
<Button size="sm" label={'비밀번호 바꾸기'} /> | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import ContentContainer from '@/app/ui/view/atom/content-container/content-container'; | ||
import TitleBox from '@/app/ui/view/molecule/title-box/title-box'; | ||
import FindIdContainer from './components/find-id-container'; | ||
import { Suspense } from 'react'; | ||
import FindIdFormSkeleton from '@/app/ui/user/find-id-form/find-id-form.skeleton'; | ||
|
||
export default function FindIdPage() { | ||
return ( | ||
<ContentContainer className="p-4 pb-0"> | ||
<TitleBox title="아이디 찾기" /> | ||
<Suspense fallback={<FindIdFormSkeleton />}> | ||
<FindIdContainer /> | ||
</Suspense> | ||
</ContentContainer> | ||
); | ||
} |
32 changes: 32 additions & 0 deletions
32
app/(sub-page)/find-password/components/find-password-container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use client'; | ||
|
||
import useFunnel from '@/app/hooks/useFunnel'; | ||
import FindPasswordForm from '@/app/ui/user/find-password-from/find-password-form'; | ||
import FindPasswordValidateForm from '@/app/ui/user/find-password-from/find-password-validate-form'; | ||
import { FormState } from '@/app/ui/view/molecule/form/form-root'; | ||
import { useState } from 'react'; | ||
|
||
function FindPasswordContainer() { | ||
const { Funnel, setStep } = useFunnel<'validate' | 'form'>('validate'); | ||
const [authId, setAuthId] = useState<string>(''); | ||
|
||
return ( | ||
<div className="p-6"> | ||
<Funnel> | ||
<Funnel.Step name="validate"> | ||
<FindPasswordValidateForm | ||
onNext={(formState?: FormState) => { | ||
setStep('form'); | ||
if (formState?.value) setAuthId(formState?.value.authId); | ||
}} | ||
/> | ||
</Funnel.Step> | ||
<Funnel.Step name="form"> | ||
<FindPasswordForm authId={authId} /> | ||
</Funnel.Step> | ||
</Funnel> | ||
</div> | ||
); | ||
} | ||
|
||
export default FindPasswordContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ContentContainer from '@/app/ui/view/atom/content-container/content-container'; | ||
import TitleBox from '@/app/ui/view/molecule/title-box/title-box'; | ||
import FindPasswordContainer from './components/find-password-container'; | ||
import { Suspense } from 'react'; | ||
import FindIdFormSkeleton from '../../ui/user/find-id-form/find-id-form.skeleton'; | ||
|
||
function FindPasswordPage() { | ||
return ( | ||
<ContentContainer className="p-4 pb-0"> | ||
<TitleBox title="비밀번호 재설정" /> | ||
<Suspense fallback={<FindIdFormSkeleton />}> | ||
<FindPasswordContainer /> | ||
</Suspense> | ||
</ContentContainer> | ||
); | ||
} | ||
|
||
export default FindPasswordPage; |
17 changes: 17 additions & 0 deletions
17
app/(sub-page)/sign-in/components/auth-option-container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Link from 'next/link'; | ||
|
||
function AuthOptionContainer() { | ||
return ( | ||
<div className="text-gray-6 flex gap-2"> | ||
<div className="after:content-['|'] after:pl-2"> | ||
<Link href="/find-id">아이디 찾기</Link> | ||
</div> | ||
<div className="after:content-['|'] after:pl-2"> | ||
<Link href="/find-password">비밀번호 재설정</Link> | ||
</div> | ||
<Link href="/sign-up">회원가입하기</Link> | ||
</div> | ||
); | ||
} | ||
|
||
export default AuthOptionContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.