Skip to content

Commit

Permalink
Add NFT page poll interval
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed Mar 29, 2024
1 parent 88b9c1e commit 086860f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/pages/nft/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useQuery, useSubscription } from '@apollo/client';
import { useQuery } from '@apollo/client';

import { NFT_QUERY } from './consts';

function useNFT(collectionId: string, idInCollection: string) {
const id = `${collectionId}-${idInCollection}`;
const { data } = useQuery(NFT_QUERY, { variables: { id } });
const { data } = useQuery(NFT_QUERY, { variables: { id }, pollInterval: 10000 });

return data?.nftById;
}
Expand Down

0 comments on commit 086860f

Please sign in to comment.