Skip to content

Commit

Permalink
Where is my commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ladytrekker committed Apr 18, 2023
1 parent 0a37f9b commit c165b24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion carbonmark/hooks/useFetchUser.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { urls } from "lib/constants";
import { fetcher } from "lib/fetcher";
import { User } from "lib/types/carbonmark";
import type { SWRConfiguration } from "swr";
import useSWR from "swr";

export const useFetchUser = (address?: string, options?: SWRConfiguration) => {
const { data, ...rest } = useSWR<User>(
address ? `/api/users/${address}?type=wallet` : null,
address ? `${urls.baseUrl}/api/users/${address}?type=wallet` : null,
fetcher,
options
);
Expand Down

0 comments on commit c165b24

Please sign in to comment.