Skip to content

Commit

Permalink
fix tags
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Nov 4, 2024
1 parent 0c7eaf8 commit b770151
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion www/src/components/marketplace/MarketplaceSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import styled from 'styled-components'

import { useCategoriesQuery, useTagsQuery } from '../../generated/graphql'
import { useFetchPaginatedData } from '../utils/useFetchPaginatedData'
import { mapExistingNodes } from '../../utils/graphql'

const SIDEBAR_WIDTH = 256 - 32

Expand Down Expand Up @@ -247,6 +248,8 @@ function MarketplaceSidebar({ isOpen }: { isOpen: boolean }) {

const [search, setSearch] = useState('')

const tags = useMemo(() => mapExistingNodes(data?.tags) ?? [], [data])

if (!categoriesData) return null

const filteredCategories = categoriesData.categories?.filter(
Expand All @@ -258,7 +261,7 @@ function MarketplaceSidebar({ isOpen }: { isOpen: boolean }) {
<Div>
<Categories categories={filteredCategories} />
<Tags
tags={data?.tags}
tags={tags}
hasMore={pageInfo?.hasNextPage}
fetchMore={fetchNextPage}
search={search}
Expand Down

0 comments on commit b770151

Please sign in to comment.