This repository has been archived on 2022-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
gosh-commerce/framework/commerce/utils/default-fetcher.ts
2021-09-11 22:49:44 +00:00

13 lines
285 B
TypeScript

import type { HookFetcherFn } from './types'
export const SWRFetcher: HookFetcherFn<any> = ({ options, fetch }) =>
fetch(options)
export const mutationFetcher: HookFetcherFn<any> = ({
input,
options,
fetch,
}) => fetch({ ...options, body: input })
export default SWRFetcher