11import { FC } from 'react'
22import { useTranslation } from 'react-i18next'
3- import { Select } from '@oasisprotocol/ui-library/src/components/select'
4- import Typography from '@mui/material/Typography'
53import { ConsensusEventType , Layer } from '../../../oasis-nexus/api'
64import { ConsensusEventFilteringType } from '../../hooks/useCommonParams'
75import { TFunction } from 'i18next'
86import { paraTimesConfig } from '../../../config'
97import { ParamSetterFunction } from '../../hooks/useTypedSearchParam'
108import { getConsensusEventTypeLabel } from './ConsensusEventDetails'
9+ import { FilterByType } from '../FilterByType'
1110
1211type Option = {
1312 value : ConsensusEventFilteringType
@@ -26,24 +25,6 @@ const getConsensusEventTypeOptions = (t: TFunction, layer: Layer) => {
2625 )
2726}
2827
29- const FilterLabel : FC = ( ) => {
30- const { t } = useTranslation ( )
31- return (
32- < Typography
33- component = { 'span' }
34- sx = { {
35- fontStyle : 'normal' ,
36- fontWeight : 700 ,
37- fontSize : 16 ,
38- lineHeight : '150%' ,
39- marginRight : 4 ,
40- } }
41- >
42- { t ( 'event.filterByType' ) }
43- </ Typography >
44- )
45- }
46-
4728export const ConsensusEventTypeFilter : FC < {
4829 layer : Layer
4930 value : ConsensusEventFilteringType
@@ -57,5 +38,5 @@ export const ConsensusEventTypeFilter: FC<{
5738 ? [ ...defaultOptions , ...customOptions ]
5839 : [ ...defaultOptions , ...getConsensusEventTypeOptions ( t , layer ) ]
5940
60- return < Select options = { options } value = { value } handleChange = { setValue } />
41+ return < FilterByType options = { options } value = { value } handleChange = { setValue } />
6142}
0 commit comments