diff --git a/README.md b/README.md index 36e0bde..8bbd001 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ### ✅ Work Flow -1. [ 기능 명세](https://www.notion.so/6017bafc0aca4b7ba1d2854b208efe39?pvs=21) 를 기반으로 `Issue` 생성 +1. [기능 명세](https://www.notion.so/6017bafc0aca4b7ba1d2854b208efe39?pvs=21) 를 기반으로 `Issue` 생성 2. 생성한 `Issue` 번호로 로컬에서 브랜치 생성(feature/#이슈번호) 3. `dev`의 최신변경사항을 pull 받아서 동기화 4. 구현완료후 `dev`로 push후 Pull Request 생성 diff --git a/src/api/service.ts b/src/api/service.ts index 0313427..9256300 100644 --- a/src/api/service.ts +++ b/src/api/service.ts @@ -132,6 +132,11 @@ export const postAuth = async (email: string, password: string) => { return res; }; +// axios.get('https://example.com/api/data').then((response) => { +// const cookies = response.headers['set-cookie']; +// console.log(cookies); +// }); + export const updateProductState = async ( productStateId: number | undefined, changeStateCode: number, diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 7e6b31b..d1d194b 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,6 +1,22 @@ import LoginPage from '@/templates/login/loginPage'; +// import axios from 'axios'; + +// const client = axios.create({ +// withCredentials: true, +// baseURL: process.env.NEXT_PUBLIC_BASE_URL, +// }); +// export const postAuth = async (email: string, password: string) => { +// const res = await client.post('/login', { +// email: email, +// password: password, +// }); +// return res.headers; +// }; + +export default async function Login() { + // const res = await postAuth('hojin@naver.com', '123456'); + // console.log(res['set-cookie']); -export default function Login() { return ( <> diff --git a/src/templates/login/loginPage.tsx b/src/templates/login/loginPage.tsx index d45f0f5..3fb8c3a 100644 --- a/src/templates/login/loginPage.tsx +++ b/src/templates/login/loginPage.tsx @@ -7,7 +7,11 @@ import { useState } from 'react'; import { useRouter } from 'next/navigation'; import { postAuth } from '@/api/service'; -export default function LoginPage() { +// interface LoginPageProps { +// cookies: string[] | undefined; +// } + +const LoginPage = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [isLogin, setIsLogin] = useState(false); @@ -73,4 +77,6 @@ export default function LoginPage() { ); -} +}; + +export default LoginPage;