1- import { SupportedCard , GLOBAL_TAG , MY_LANGUAGES_TAG , dateRanges } from 'src/config'
2- import { FiFilter } from 'react-icons/fi'
31import { useState } from 'react'
2+ import { FiFilter } from 'react-icons/fi'
43import { BottomSheet } from 'react-spring-bottom-sheet'
54import 'react-spring-bottom-sheet/dist/style.css'
6- import { useUserPreferences } from 'src/stores/preferences'
7- import { trackCardLanguageSelect , trackCardDateRangeSelect } from 'src/lib/analytics'
85import { ChipsSet } from 'src/components/Elements'
6+ import { dateRanges , GLOBAL_TAG , MY_LANGUAGES_TAG , SupportedCard } from 'src/config'
7+ import { trackCardDateRangeSelect , trackCardLanguageSelect } from 'src/lib/analytics'
8+ import { useUserPreferences } from 'src/stores/preferences'
99
1010type ListingFilterMobileProps = {
1111 card : SupportedCard
@@ -53,9 +53,9 @@ export const FloatingFilter = ({ card, filters = ['language'] }: ListingFilterMo
5353 onChange = { ( _ , option ) => {
5454 setCardSettings ( card . value , {
5555 ...cardsSettings [ card . value ] ,
56- language : option . value ,
56+ language : option [ 0 ] . value ,
5757 } )
58- trackCardLanguageSelect ( card . analyticsTag , option . value )
58+ trackCardLanguageSelect ( card . analyticsTag , option [ 0 ] . value )
5959 } }
6060 />
6161 </ div >
@@ -76,9 +76,9 @@ export const FloatingFilter = ({ card, filters = ['language'] }: ListingFilterMo
7676 onChange = { ( _ , option ) => {
7777 setCardSettings ( card . value , {
7878 ...cardsSettings [ card . value ] ,
79- dateRange : option . value ,
79+ dateRange : option [ 0 ] . value ,
8080 } )
81- trackCardDateRangeSelect ( card . analyticsTag , option . value )
81+ trackCardDateRangeSelect ( card . analyticsTag , option [ 0 ] . value )
8282 } }
8383 />
8484 </ div >
0 commit comments