2022-01-21 11:09:32 +01:00

13 lines
260 B
TypeScript

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