blob: 9d790340c79d3d1d25397f880cf98c76d74bd485 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
import useSWR from 'swr'
import fetchJson from 'lib/fetchJson'
export default function useNotes(){
const { data: notes, error, mutate: mutateNotes } = useSWR('/api/notes')
return {notes, mutateNotes, error}
}
|