1
0
mirror of https://github.com/vercel/commerce.git synced 2025-06-10 18:06:58 +00:00
2021-06-22 17:12:31 -04:00

12 lines
225 B
TypeScript

import { Fetcher } from '@commerce/utils/types'
export const fetcher: Fetcher = async () => {
const res = await fetch('./data.json')
if (res.ok) {
const { data } = await res.json()
return data
}
throw res
}