Skip to content

Commit

Permalink
Fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
julixC committed Feb 25, 2025
1 parent 4ab8c7e commit 2be8298
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions react/components/FacetItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import classNames from 'classnames'
import { useSearchPage } from 'vtex.search-page-context/SearchPageContext'
import { usePixel } from 'vtex.pixel-manager'
import { useIntl } from 'react-intl'
import { useRuntime } from 'vtex.render-runtime'

Check failure on line 8 in react/components/FacetItem.js

View workflow job for this annotation

GitHub Actions / Lint

There should be at least one empty line between import groups
import { pushFilterManipulationPixelEvent } from '../utils/filterManipulationPixelEvents'
import SettingsContext from './SettingsContext'
import ShippingActionButton from './ShippingActionButton'
import useShippingActions from '../hooks/useShippingActions'
import { useRuntime } from 'vtex.render-runtime'

const CSS_HANDLES = ['filterItem', 'productCount', 'filterItemTitle']

Expand Down Expand Up @@ -107,7 +107,7 @@ const FacetItem = ({
</>
)
}

return labelElement
}, [
showFacetQuantity,
Expand All @@ -125,14 +125,16 @@ const FacetItem = ({
intl,
])

const { query: runtimeQuery } = useRuntime()
const runtimeQuery = useRuntime()?.query

let initialquery = undefined;
let initialmap = undefined;
let initialmap
let initialquery

if(searchQuery?.variables?.fullText === undefined){
initialquery = runtimeQuery?.initialQuery ?? searchQuery?.facets?.queryArgs.query;
initialmap = runtimeQuery?.initialMap ?? searchQuery?.facets?.queryArgs?.map;
if (searchQuery?.variables?.fullText === undefined) {
initialquery =

Check failure on line 134 in react/components/FacetItem.js

View workflow job for this annotation

GitHub Actions / Lint

Delete `·`
runtimeQuery?.initialQuery ?? searchQuery?.facets?.queryArgs.query
initialmap =

Check failure on line 136 in react/components/FacetItem.js

View workflow job for this annotation

GitHub Actions / Lint

Delete `·⏎·····`
runtimeQuery?.initialMap ?? searchQuery?.facets?.queryArgs?.map
}

return (
Expand Down

0 comments on commit 2be8298

Please sign in to comment.