Skip to content

Commit

Permalink
feat(nfts): add collections to firehose filters
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed May 4, 2022
1 parent c741b5f commit e3375b1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CombinedError } from 'urql'
import LazyLoadContainer from 'components/LazyLoadContainer'
import { actions, selectors } from 'data'
import { RootState } from 'data/rootReducer'
import { CollectionSortFields, SortDirection, useCollectionsQuery } from 'generated/graphql.types'

import { Grid, GridWrapper } from '../components'
import NftError from '../components/NftError'
Expand All @@ -17,6 +18,12 @@ import NftFilter, { NftFilterFormValuesType } from '../NftFilter'
import NftFirehoseResults from './Firehose.results'

const NftFirehose: React.FC<Props> = ({ formActions, formValues }) => {
const [collectionsQuery] = useCollectionsQuery({
variables: {
sort: { by: CollectionSortFields.OneDayVolume, direction: SortDirection.Desc }
}
})

const [refreshTrigger, setRefreshTrigger] = useState<number>(0)

const [pageVariables, setPageVariables] = useState([{ page: 0 }])
Expand Down Expand Up @@ -60,7 +67,7 @@ const NftFirehose: React.FC<Props> = ({ formActions, formValues }) => {
formValues={formValues}
formActions={formActions}
setRefreshTrigger={setRefreshTrigger}
collections={[]}
collections={collectionsQuery.data?.collections || []}
setActiveTab={() => null}
/>
<NftPageLazyLoadWrapper>
Expand Down

0 comments on commit e3375b1

Please sign in to comment.