From 08ae16ce7735f2831914ef20ec44911c7f859f8d Mon Sep 17 00:00:00 2001 From: heejin <77238424+devmanta@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:54:45 +0900 Subject: [PATCH] =?UTF-8?q?[=EA=B9=80=ED=9D=AC=EC=A7=84]=20sprint10=20(#12?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: add import type * refactor: code review * feat: add select box on board filter * feat: add board card css * feat: add infinite scroll * chore: add image domain * refactor: extract variable * fix: remove useApi * refactor: extract useBorad hook * refactor: rename file * chore: remove unused import --- next.config.js | 7 +- pages/boards/[id].tsx | 9 +++ pages/boards/components/BestBoardCard.tsx | 13 ++-- pages/boards/components/BestBoards.tsx | 2 +- pages/boards/components/BoardCard.module.css | 74 ++++++++++++++++++++ pages/boards/components/BoardCard.tsx | 44 ++++++++++++ pages/boards/components/Boards.module.css | 27 +++++++ pages/boards/components/Boards.tsx | 42 +++++++++-- pages/boards/index.tsx | 4 +- src/apis/boardTypes.ts | 2 +- src/apis/boardsApi.ts | 2 +- src/assets/ic_arrow_down.svg | 5 ++ src/components/Button.tsx | 3 +- src/components/GlobalLayout.module.css | 19 +++++ src/components/GlobalLayout.tsx | 2 +- src/components/Header.module.css | 4 ++ src/components/Header.tsx | 19 ++++- src/hooks/useApi.tsx | 41 +++++++++++ src/hooks/useBoards.ts | 74 ++++++++++++++++++++ styles/globals.css | 19 ----- 20 files changed, 373 insertions(+), 39 deletions(-) create mode 100644 pages/boards/[id].tsx create mode 100644 pages/boards/components/BoardCard.module.css create mode 100644 pages/boards/components/BoardCard.tsx create mode 100644 src/assets/ic_arrow_down.svg create mode 100644 src/hooks/useApi.tsx create mode 100644 src/hooks/useBoards.ts diff --git a/next.config.js b/next.config.js index da265d11..3eeba39b 100644 --- a/next.config.js +++ b/next.config.js @@ -2,7 +2,12 @@ const nextConfig = { reactStrictMode: true, images: { - domains: ['sprint-fe-project.s3.ap-northeast-2.amazonaws.com'], + domains: [ + 'sprint-fe-project.s3.ap-northeast-2.amazonaws.com', + 'example.com', + 'via.placeholder.com', + 'flexible.img.hani.co.kr', + ], }, }; diff --git a/pages/boards/[id].tsx b/pages/boards/[id].tsx new file mode 100644 index 00000000..908547fa --- /dev/null +++ b/pages/boards/[id].tsx @@ -0,0 +1,9 @@ +import { useRouter } from 'next/router'; +import styles from './[id].module.css'; + +export default function BoardDetail() { + const router = useRouter(); + const { id } = router.query; + + return
{title}
+ {image && ( +