move CRUD operations to helpers

This commit is contained in:
Thomas Ruoff
2021-06-07 23:32:54 +02:00
parent 865bbb20fa
commit 92477e5325
9 changed files with 102 additions and 93 deletions

View File

@@ -1,6 +1,7 @@
import useSWR from 'swr'
import fetch from './fetch'
const fetcher = (path: string) => fetch(path).then((r) => r.json())
const fetcher = (path: string) => fetch(path)
function useDaysBooked() {
const { data: daysBooked, error: daysBookedError } = useSWR(