Skip to content

Commit

Permalink
Merge pull request #243 from hackdays-io/fix/hats-429-in-asign-role-page
Browse files Browse the repository at this point in the history
fix: getHat to useCallback for hats 429 error
  • Loading branch information
yu23ki14 authored Jan 11, 2025
2 parents 5137190 + edbe726 commit 96ad352
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/frontend/hooks/useHats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const useHats = () => {
[getWearerInfo],
);

const getHat = async (hatId: string) => {
const getHat = useCallback(async (hatId: string) => {
const hat = await hatsSubgraphClient.getHat({
chainId: currentChain.id,
hatId: BigInt(hatId),
Expand All @@ -241,7 +241,7 @@ export const useHats = () => {
});

return hat;
};
}, []);

const getWorkspacesList = useCallback(
async (params: { walletAddress: string }) => {
Expand Down

0 comments on commit 96ad352

Please sign in to comment.