Skip to content

Commit

Permalink
Add skip option to usePublicationsQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
sasicodes committed Mar 28, 2024
1 parent 8ccc680 commit f51f371
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/web/src/components/Home/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const Feed = ({ showFilter = true }) => {
}

const { data, loading, error, fetchMore } = usePublicationsQuery({
variables: { request }
variables: { request },
skip: !curatedProfiles?.length
})

const pageInfo = data?.publications?.pageInfo
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/components/Home/LatestBytes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const LatestBytes = () => {
}

const { data, error, loading } = usePublicationsQuery({
variables: { request }
variables: { request },
skip: !curatedProfiles?.length
})

const bytes = data?.publications?.items as PrimaryPublication[]
Expand Down

0 comments on commit f51f371

Please sign in to comment.