@decocms/apps 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vtex/hooks/useCart.ts +2 -2
package/package.json
CHANGED
package/vtex/hooks/useCart.ts
CHANGED
|
@@ -134,7 +134,7 @@ async function updateItemQuantity(
|
|
|
134
134
|
export interface UseCartOptions {
|
|
135
135
|
/** Enable automatic refetching. @default true */
|
|
136
136
|
enabled?: boolean;
|
|
137
|
-
/** Stale time in ms. @default
|
|
137
|
+
/** Stale time in ms. @default 30000 */
|
|
138
138
|
staleTime?: number;
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -144,7 +144,7 @@ export function useCart(options?: UseCartOptions) {
|
|
|
144
144
|
const query = useQuery({
|
|
145
145
|
queryKey: CART_QUERY_KEY,
|
|
146
146
|
queryFn: fetchCart,
|
|
147
|
-
staleTime: options?.staleTime ??
|
|
147
|
+
staleTime: options?.staleTime ?? 30_000,
|
|
148
148
|
enabled: options?.enabled !== false,
|
|
149
149
|
});
|
|
150
150
|
|