diff options
Diffstat (limited to 'src/hooks/APIClient.ts')
-rw-r--r-- | src/hooks/APIClient.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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<User> => { return useSWR( username && `/users?username=${username}`, (url: string) => get(url).then(response => response.data[0]) - ) as Response<User>; + ); }; export const useProfile = (id: string): Response<Poll[]> => { - return useSWR(id && `/profiles/${id}`, fetcher) as Response<Poll[]>; + return useSWR(id && `/profiles/${id}`, fetcher); }; export const useFeed = (): Response<Poll[]> => { - return useSWR('/feed', fetcher, { revalidateOnFocus: false }) as Response<Poll[]>; + return useSWR('/feed', fetcher, { revalidateOnFocus: false }); }; export const useFeedback = (): Response<Feedback[]> => { - return useSWR('/feedback', fetcher) as Response<Feedback[]>; + return useSWR('/feedback', fetcher); }; |