aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-10-08 20:18:21 +0300
committereug-vs <eug-vs@keemail.me>2020-10-08 20:18:21 +0300
commit33b3066b04f7560455c113a18fe39d33933daaf1 (patch)
treefb8de76d92c42671b2074faadcba749c86554166
parent3ea7d6bd0bfd6aefd939bf84f5dc1696cf68231e (diff)
downloadwhich-ui-33b3066b04f7560455c113a18fe39d33933daaf1.tar.gz
fix: replace typo id -> username
-rw-r--r--src/hooks/APIClient.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks/APIClient.ts b/src/hooks/APIClient.ts
index cf5d247..68413b0 100644
--- a/src/hooks/APIClient.ts
+++ b/src/hooks/APIClient.ts
@@ -13,8 +13,8 @@ export const useUser = (username: string | null): Response<User> => {
);
};
-export const useProfile = (id: string): Response<Poll[]> => {
- return useSWR(id && `/profiles/${id}`, fetcher);
+export const useProfile = (username: string): Response<Poll[]> => {
+ return useSWR(username && `/profiles/${username}`, fetcher);
};
export const useFeed = (): Response<Poll[]> => {