Skip to content

Instantly share code, notes, and snippets.

@t3dotgg
Created September 1, 2021 23:06
Show Gist options
  • Save t3dotgg/96bceedd4c07af44f2ff1ba75f03511d to your computer and use it in GitHub Desktop.
Save t3dotgg/96bceedd4c07af44f2ff1ba75f03511d to your computer and use it in GitHub Desktop.
export const useGetUserProfile = (userId: string) => {
return useQuery(["user-profile", userId], async () => {
return await fetch("/user/"+userId);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment