Skip to content

Commit

Permalink
fix: user grant
Browse files Browse the repository at this point in the history
  • Loading branch information
MrX-SNX committed Sep 24, 2024
1 parent 461544b commit 0c7a134
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/components/Home/UserGrants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { useAccount } from "wagmi";
export default function UserGrants() {
const { address, chain } = useAccount();

const networkId = chain.id || "10";
const networkId = chain?.id || "10";

const [grants, setGrant] = useRecoilState(getGrantsByUser(address));
const [loadingData, setLoadingData] = useState(true);

useEffect(() => {
if (address && networkId) {
fetchGrantsByUser(setGrant, address, networkId).finally(() => {
fetchGrantsByUser(address).finally(() => {
setLoadingData(false);
});
}
Expand Down

0 comments on commit 0c7a134

Please sign in to comment.