Skip to content

Commit 03f18f6

Browse files
committed
fix: query parameter가 다른 상황에서 react-query가 다른 쿼리를 하도록 수정
1 parent 0b727b2 commit 03f18f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shop/src/hooks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace ShopHooks {
7171

7272
export const useProducts = (client: ShopAPIClient, qs?: ShopSchemas.ProductListQueryParams) =>
7373
useSuspenseQuery({
74-
queryKey: QUERY_KEYS.PRODUCT_LIST,
74+
queryKey: [...QUERY_KEYS.PRODUCT_LIST, qs ? JSON.stringify(qs) : ""],
7575
queryFn: () => ShopAPIs.listProducts(client)(qs),
7676
});
7777

0 commit comments

Comments
 (0)