4
0
forked from crowetic/commerce

Allow custom swr

This commit is contained in:
Luis Alvarez
2020-10-09 17:18:02 -05:00
parent d67c728e80
commit 939bc388bb
2 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,8 @@ export function extendHook(customFetcher: typeof fetcher) {
const useCart = () => {
const cart = useCommerceCart<Cart | null>(
[defaultOpts.url, undefined],
customFetcher
customFetcher,
{ revalidateOnFocus: false }
)
// Uses a getter to only calculate the prop when required