@@ -42,7 +42,7 @@ namespace ShopHooks {
4242
4343 export const useUserStatus = ( client : ShopAPIClient ) =>
4444 useSuspenseQuery ( {
45- queryKey : [ client . language , ... QUERY_KEYS . USER ] ,
45+ queryKey : [ ... QUERY_KEYS . USER , client . language ] ,
4646 queryFn : ShopAPIs . retrieveUserInfo ( client ) ,
4747 retry : 3 ,
4848 } ) ;
@@ -71,13 +71,13 @@ namespace ShopHooks {
7171
7272 export const useProducts = ( client : ShopAPIClient , qs ?: ShopSchemas . ProductListQueryParams ) =>
7373 useSuspenseQuery ( {
74- queryKey : [ client . language , ... QUERY_KEYS . PRODUCT_LIST , qs ? JSON . stringify ( qs ) : "" ] ,
74+ queryKey : [ ... QUERY_KEYS . PRODUCT_LIST , qs ? JSON . stringify ( qs ) : "" , client . language ] ,
7575 queryFn : ( ) => ShopAPIs . listProducts ( client ) ( qs ) ,
7676 } ) ;
7777
7878 export const useCart = ( client : ShopAPIClient ) =>
7979 useSuspenseQuery ( {
80- queryKey : [ client . language , ... QUERY_KEYS . CART_INFO ] ,
80+ queryKey : [ ... QUERY_KEYS . CART_INFO , client . language ] ,
8181 queryFn : ShopAPIs . retrieveCart ( client ) ,
8282 } ) ;
8383
@@ -111,7 +111,7 @@ namespace ShopHooks {
111111
112112 export const useOrders = ( client : ShopAPIClient ) =>
113113 useSuspenseQuery ( {
114- queryKey : [ client . language , ... QUERY_KEYS . ORDER_LIST ] ,
114+ queryKey : [ ... QUERY_KEYS . ORDER_LIST , client . language ] ,
115115 queryFn : ShopAPIs . listOrders ( client ) ,
116116 } ) ;
117117
0 commit comments