From 00a45270540f601ce797d1664fc65bbb2478099a Mon Sep 17 00:00:00 2001 From: shinhyojeong Date: Wed, 24 Jan 2024 03:20:55 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EA=B0=80=EB=8F=85=EC=84=B1=EC=9D=84?= =?UTF-8?q?=20=EC=9C=84=ED=95=9C=20=EB=B3=80=EC=88=98=EB=AA=85=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/categories/[categoryCode].tsx | 9 ++++----- src/pages/index.tsx | 11 ++++++----- src/pages/result/index.tsx | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/pages/categories/[categoryCode].tsx b/src/pages/categories/[categoryCode].tsx index 9c421053..65eeb7f0 100644 --- a/src/pages/categories/[categoryCode].tsx +++ b/src/pages/categories/[categoryCode].tsx @@ -11,7 +11,9 @@ import { PostSection, ResultHeader } from '@components' import type { SortOptionCodes, TradeTypeCodes } from '@types' import { find, removeNullish, toQueryString } from '@utils' -const DEFAULT_POST_PAGE_NUMBER = 8 +const DEFAULT_PER_PAGE = 8 +// TODO: 포스트 전체 갯수 내려달라고 요청해놓았습니다 +const POSTS_COUNT_MOCK = 10 type CategoriesProps = { category?: string @@ -33,9 +35,6 @@ export const getServerSideProps: GetServerSideProps = async ({ } }) -// TODO: 포스트 전체 갯수 내려달라고 요청해놓았습니다 -const POSTS_COUNT_MOCK = 10 - const Categories: NextPage = ({ category, sort, @@ -65,7 +64,7 @@ const Categories: NextPage = ({ const infinitePosts = useGetInfinitePostsQuery({ lastId: null, - limit: DEFAULT_POST_PAGE_NUMBER, + limit: DEFAULT_PER_PAGE, ...searchParams }) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 870d31a2..3144c422 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -7,6 +7,10 @@ import { ProductList } from '../components/home/ProductList' import { useGetInfinitePostsQuery } from '@apis/post' import { CategorySlider, HomeBanner } from '@components' +const DEFAULT_PER_PAGE = 8 +// TODO: 포스트 전체 갯수 내려달라고 요청해놓았습니다 +const POSTS_COUNTS_MOCK = 10 + const Home: NextPage = () => { const { data: postList, @@ -14,20 +18,17 @@ const Home: NextPage = () => { hasNextPage } = useGetInfinitePostsQuery({ lastId: null, - limit: 8 + limit: DEFAULT_PER_PAGE }) const router = useRouter() - // TODO: 포스트 전체 갯수 내려달라고 요청해놓았습니다 - const postsCount = 10 - return ( 새로운 상품 - {postsCount > 0 ? ( + {POSTS_COUNTS_MOCK > 0 ? (