Skip to content

Commit

Permalink
refactor: 상품 리프레쉬 관련 의존성 배열 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
heonq committed Oct 30, 2024
1 parent 22aab88 commit 3c8a903
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/Products.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ function Products() {
best: MEDIA_QUERY.bestProductsPageSize[screenWidth],
normal: MEDIA_QUERY.productsPageSize[screenWidth],
});
}, [screenWidth]);

useEffect(() => {
bestProducts.refetch();
products.refetch();
}, [screenWidth]);
}, [screenWidth, productSortBy, searchKeyword, page]);

return (
<MainContainer>
Expand Down

0 comments on commit 3c8a903

Please sign in to comment.