diff --git a/README.md b/README.md index e215bc4c..a8ab8865 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,84 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). +# π WishPool -## Getting Started +WishPoolμ μ¬λ¬ μ¬λμ΄ μ μν μ λ¬Ό μ€μμ μμΌμκ° μ§μ μ νν μ μλλ‘ λλ **μ λ¬Ό μ ν κ³Όμ μ€μ¬μ νλ μ΄μ μλΉμ€**μ λλ€. -First, run the development server: +μ λ¬Ό κ²°κ³Όλ³΄λ€ **μ λ¬Όμ κ³ λ₯΄λ κ³Όμ μ κ²½ν**μ μ§μ€νμ¬, μμΌμμ μ°Έμ¬μ λͺ¨λκ° λ§μ‘±ν μ μλ μ λ¬Ό μ€λΉλ₯Ό λμ΅λλ€. -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` +--- -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +## π λ°°ν¬ λ§ν¬ +- μλΉμ€ URL: https://wishpool.store +- GitHub Repository: https://github.com/WishPool-dev -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +--- -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. +## π‘ κΈ°ν λ°°κ²½ -## Learn More +μ¬λ¬ λͺ μ΄ ν¨κ» μμΌ μ λ¬Όμ μ€λΉν μλ‘ μμΌμμ μ·¨ν₯μ μ νν λ°μνκΈ° μ΄λ ΅κ³ , μ ν κ³Όμ μμ μκ²¬μ΄ λΆμ°λλ λ¬Έμ κ° λ°μν©λλ€. -To learn more about Next.js, take a look at the following resources: +WishPoolμ μ λ¬Ό μ μ κ³Όμ μ μ΄μ΄λκ³ μ΅μ’ μ ν κΆνμ μμΌμμκ² λ§‘κΉμΌλ‘μ¨, μ λ¬Ό μ€λΉ κ³Όμ μ λΆλ΄μ μ€μ΄κ³ μ λ¬Ό λ§μ‘±λλ₯Ό λμ΄κ³ μ κΈ°νλμμ΅λλ€. -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +--- -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! +## β¨ μ£Όμ κΈ°λ₯ -## Deploy on Vercel +### π μμν μμ± -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +λνμλ μμΌμμ μμΌκ³Ό μ λ¬Ό μλ Ή λ μ§λ₯Ό μ ννμ¬ μμνμ μμ±ν μ μμ΅λλ€. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +μμν μμ±μ΄ μλ£λλ©΄ μ°Έμ¬μλ₯Ό μ΄λν μ μλ λ§ν¬κ° λ°κΈλλ©°, μΉ΄μΉ΄μ€ν‘ 곡μ κΈ°λ₯μ ν΅ν΄ κ°νΈνκ² μ λ¬ν μ μμ΅λλ€. + +--- + +### π μ λ¬Ό μ μ + +λνμμ μ°Έμ¬μλ μμ±λ μμνμ μμΌμμκ² μ£Όκ³ μΆμ μ λ¬Όμ μμ λ‘κ² μ μν μ μμ΅λλ€. + +κ° μ λ¬Όμ **μ΄λ―Έμ§, λ§ν¬, μ΄λ¦** μ 보λ₯Ό ν¬ν¨νμ¬ λ±λ‘λλ©°, μ¬λ¬ κ°μ μ λ¬Όμ μ μνλ κ²λ κ°λ₯ν©λλ€. + +μ΄λ₯Ό ν΅ν΄ μ°Έμ¬μλ€μ λ€μν μμ΄λμ΄κ° μμ°μ€λ½κ² λͺ¨μ΄λλ‘ μ€κ³νμ΅λλ€. + +--- + +### π― μμΌμ μ λ¬Ό μ ν + +μμΌμλ μ°Έμ¬μλ€μ΄ μ μν μ λ¬Ό λͺ©λ‘μ νμΈν λ€, μνμ§ μλ μ λ¬Όμ **λλκ·Έ μΈν°λμ μΌλ‘ μ κ±°**νλ©° μ΅μ’ μ μΌλ‘ λ°κ³ μΆμ μ λ¬Όλ§ μ νν μ μμ΅λλ€. + +μ λ¬Ό μ ν κ³Όμ μ λ¨μν κ²°μ μ΄ μλ, λΆλ΄ μμ΄ μ¦κΈΈ μ μλ νλμ κ²½νμΌλ‘ μ 곡ν©λλ€. + +--- + +### π£ μ ν κ²°κ³Ό 곡μ + +μμΌμμ μ νμ΄ μλ£λλ©΄ λνμμ ν νλ©΄μμ μ ν μλ£ μνλ₯Ό νμΈν μ μμ΅λλ€. + +μ νλ μ λ¬Ό λͺ©λ‘μ μΉ΄μΉ΄μ€ν‘ 곡μ λ²νΌμ ν΅ν΄ μ°Έμ¬μλ€κ³Ό κ°νΈνκ² κ³΅μ ν μ μμ΄, μ λ¬Ό μ€λΉ κ³Όμ μ μμ°μ€λ½κ² λ§λ¬΄λ¦¬ν μ μμ΅λλ€. + +--- + +## π οΈ κΈ°μ μ€ν + +### Frontend +- Next.js +- React +- TypeScript +- TanStack Query +- Tailwind CSS + +### Tooling +- ESLint +- Prettier +- Husky + +--- + +## π νλ‘μ νΈ κ΅¬μ‘° + +```text +src/ +ββ api/ # API μμ² λ° TanStack Query hooks +ββ components/ # κ³΅ν΅ UI μ»΄ν¬λνΈ +ββ pages/ # νμ΄μ§ λ¨μ μ»΄ν¬λνΈ +ββ styles/ # μ€νμΌ λ° λμμΈ ν ν° +ββ types/ # κ³΅ν΅ νμ μ μ +ββ utils/ # κ³΅ν΅ μ νΈ ν¨μ diff --git a/src/api/axiosInstance.ts b/src/api/axiosInstance.ts index d53b3b76..37848e61 100644 --- a/src/api/axiosInstance.ts +++ b/src/api/axiosInstance.ts @@ -1,6 +1,7 @@ import axios from 'axios'; import { HTTP_STATUS } from '@/constants/common/httpStatus'; +import { PATH } from '@/constants/common/path'; export const axiosInstance = axios.create({ baseURL: process.env.NEXT_PUBLIC_API_URL, @@ -26,6 +27,8 @@ axiosInstance.interceptors.response.use( const { response, config } = error; if (response?.status === HTTP_STATUS.UNAUTHORIZED) { + localStorage.removeItem('accessToken'); + window.location.href = PATH.INTRO; } if (response) { @@ -36,6 +39,7 @@ axiosInstance.interceptors.response.use( } else { console.error('π¨[API NETWORK ERROR], error.message'); } + return Promise.reject(error); }, ); diff --git a/src/app/pick/preview/page.tsx b/src/app/pick/preview/page.tsx index e3e7b71f..bf3e044d 100644 --- a/src/app/pick/preview/page.tsx +++ b/src/app/pick/preview/page.tsx @@ -47,7 +47,7 @@ const PreviewPage = () => { <>
μ§κΈ μ§νλκ³ μλ μ΄λ²€νΈκ° μμ΄μ
diff --git a/src/components/layout/Header/HomeHeader.tsx b/src/components/layout/Header/HomeHeader.tsx
index e5082a03..b33b09d2 100644
--- a/src/components/layout/Header/HomeHeader.tsx
+++ b/src/components/layout/Header/HomeHeader.tsx
@@ -26,7 +26,7 @@ const HomeHeader = ({ hasMenu = false, bgColor }: HomeHeaderProps) => {
const hasToken = useHasToken();
- const handleClose = () => {
+ const handleLogoClick = () => {
if (hasToken) router.push(PATH.INTRO);
router.push(PATH.HOME);
};
@@ -35,7 +35,7 @@ const HomeHeader = ({ hasMenu = false, bgColor }: HomeHeaderProps) => {
<>