Skip to content

Commit

Permalink
Merge pull request #2 from 4bujak-4bujak/feature/sign2
Browse files Browse the repository at this point in the history
Feature/sign2
  • Loading branch information
eun-hak authored May 12, 2024
2 parents 3bb6db4 + f72bfe4 commit c3c9683
Show file tree
Hide file tree
Showing 53 changed files with 3,858 additions and 112 deletions.
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

1,688 changes: 1,629 additions & 59 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@
},
"dependencies": {
"axios": "^1.6.8",
"framer-motion": "^11.1.9",
"next": "14.2.3",
"react": "^18",
"react-cookie": "^7.1.4",
"react-dom": "^18",
"react-toastify": "^10.0.5"
"react-hook-form": "^7.51.4",
"react-icons": "^5.2.1",
"react-markdown": "^9.0.1",
"react-query": "^3.39.3",
"react-toastify": "^10.0.5",
"remark-gfm": "^4.0.0"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.13",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
3 changes: 3 additions & 0 deletions public/CheckIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/CheckSubIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/CheckedIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/DropDown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions public/ExclamationMark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/RightArrowIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sign/positionCircle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sign/positionClose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sign/positionColorCircle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sign/termsDetail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sign/termsNotCheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/termsCheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions src/api/auth/auth.post.api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// import { ICommon } from '../types/common';
import { basicResponse } from '@/models/response';
import { postRequest } from '../request';
import {
ISignIn,
Expand All @@ -10,6 +11,7 @@ import {
IPhoneAuth
} from '../types/auth';


/* 회원가입 */

export const signup = async ({
Expand Down Expand Up @@ -49,22 +51,22 @@ export const signin = async ({ memberEmail, memberPassword }: ISignIn) => {
/* 이메일 인증 요청 */

export const emailauthrequest = async ({ emailAddress }: IEmail) => {
const response = await postRequest<null, IEmail>('auth/email', {
const response = await postRequest<null, IEmail>(`auth/email`, {
emailAddress
});

return response;
return response as basicResponse | null;
};

/* 이메일 코드 검증 */

export const emailauthverify = async ({ emailAddress, code }: IEmailAuth) => {
const response = await postRequest<null, IEmailAuth>('auth/email/verify', {
const response = await postRequest<null, IEmailAuth>(`auth/email/verify`, {
emailAddress,
code
});

return response;
return response as basicResponse | null;
};

/* 휴대전화 번호 인증 요청*/
Expand All @@ -74,7 +76,7 @@ export const phoneauthrequest = async ({ phoneNumber }: IPhoneNumber) => {
phoneNumber
});

return response;
return response as basicResponse | null;
};

/* 휴대전화 번호 코드 검증*/
Expand All @@ -85,7 +87,7 @@ export const phoneauthverify = async ({ phoneNumber, code }: IPhoneAuth) => {
code
});

return response;
return response as basicResponse | null;
};

/* 로그아웃*/
Expand Down
5 changes: 5 additions & 0 deletions src/api/types/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export interface IEmailAuth extends IEmail {
code: number;
}

export interface IEmailAuth2 {
emailAddress: string;
code: number;
}

export interface ITokenRefresh {
// 아직 타입 안들어옴
}
Expand Down
39 changes: 39 additions & 0 deletions src/components/findpassword/ChangePasswordDone.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import MainContainer from '../shared/MainContainer';
import { useRouter } from 'next/router';

const ChangePasswordDone = () => {
const router = useRouter();
return (
<MainContainer>
<div className="mt-[210px] flex flex-col items-center justify-center">
<div className="relative">
<div className="w-[95.84px] h-[95.84px] bg-violet-100 rounded-full">
<img src="/sign/doneCircle.png" alt="" className="w-full" />
</div>
<div
className="w-[82px] h-[100px] z-10 absolute"
style={{ left: 18, top: -25 }}>
<img src="/sign/doneCheck.png" alt="" className=" w-full" />
</div>
</div>
<div className="mt-[32px]">
<div className="text-center text-black text-[22px] font-semibold font-pretendard leading-[30.80px]">
비밀번호 재설정이 <br />
완료되었습니다.
</div>
</div>
</div>
<div className="flex justify-center items-center mb-2">
<button
className=" border text-space-purple border-space-purple mt-[100px] w-[361px] h-12 px-3.5 rounded-lg justify-center items-center inline-flex text-[15px] font-medium font-pretendard leading-snug "
type="submit"
onClick={() => router.replace('/signin')}>
로그인하러 가기
</button>
</div>
</MainContainer>
);
};

export default ChangePasswordDone;
Loading

0 comments on commit c3c9683

Please sign in to comment.