From 925587c1b21e9154c4b5dfc74d33ab4680235825 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 7 Feb 2022 16:24:33 +0200 Subject: Fix API types --- src/api.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/api.ts') diff --git a/src/api.ts b/src/api.ts index c486acc..226e213 100644 --- a/src/api.ts +++ b/src/api.ts @@ -12,12 +12,6 @@ const fetcher = (baseUrl: string) => (path: string) => fetch(`${baseUrl}${path}` throw err }) -interface Example { - id: string - title: string - content: string -} - export interface APISuccess { readonly type: "success" data: D @@ -77,7 +71,7 @@ const postRequest = async ({ baseUrl, path, body }: BasePostRequest, } } -export const useExamples = () => mapSWRResult( +export const useExamples = () => mapSWRResult( useSWR(ExampleApi.ListRequest.path, fetcher(EXAMPLE_API_URL)), ) -- cgit v1.3