From f2ad02d1f2aa5acaac430148dadfd2abc9e671e0 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 15 Aug 2020 05:04:26 +0300 Subject: refactor: get rid of unnecessary types --- src/hooks/APIClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/hooks/APIClient.ts') diff --git a/src/hooks/APIClient.ts b/src/hooks/APIClient.ts index f66ef2e..cf5d247 100644 --- a/src/hooks/APIClient.ts +++ b/src/hooks/APIClient.ts @@ -10,17 +10,17 @@ export const useUser = (username: string | null): Response => { return useSWR( username && `/users?username=${username}`, (url: string) => get(url).then(response => response.data[0]) - ) as Response; + ); }; export const useProfile = (id: string): Response => { - return useSWR(id && `/profiles/${id}`, fetcher) as Response; + return useSWR(id && `/profiles/${id}`, fetcher); }; export const useFeed = (): Response => { - return useSWR('/feed', fetcher, { revalidateOnFocus: false }) as Response; + return useSWR('/feed', fetcher, { revalidateOnFocus: false }); }; export const useFeedback = (): Response => { - return useSWR('/feedback', fetcher) as Response; + return useSWR('/feedback', fetcher); }; -- cgit v1.2.3