Skip to content

Commit

Permalink
[ fix ] 리스트 불러오기 api 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Happhee committed Jul 21, 2022
1 parent 132263f commit 1a6467d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/api/viewProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export const getBannerViewProduct = (params: { category: number }) => {
isError: error,
};
};
export const getViewProduct = () => {
return baseInstance.get('/toy/list');
export const getViewProduct = (currentPage: number) => {
return baseInstance.get(`/toy/list?page=${currentPage}`);
};
8 changes: 4 additions & 4 deletions pages/viewProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ const StEmptyView = styled.section`
margin: 0 23.8rem;
`;
export const getServerSideProps: GetServerSideProps = async (context) => {
const res = await getViewProduct();
console.log(res);
const res = await getViewProduct(0);

return {
props: {
filterData: '',
result: '',
filterData: res.data.data.filterData,
result: res.data.data.result,
},
};
};

0 comments on commit 1a6467d

Please sign in to comment.