import { useIntl } from '@vtex/gatsby-plugin-i18n' ; import { SearchControlsSelect as StoreUISortSelect } from '@vtex/store-ui' ; import React from 'react' ; import type { FC } from 'react' ; import { useSearch } from '@vtex/gatsby-theme-store' ; interface Props { variant ? : string ; } const SearchControlsSelect = ( { variant } ) => { const { formatMessage } = useIntl ( ) ; const { setSort , searchParams : { sort } , } = useSearch ( ) ; return ( < StoreUISortSelect variant = { variant } defaultValue = { sort } onChange = { setSort as any } formatLabel = { ( label ) => formatMessage ( { id : label } ) } />); } ; export default SearchControlsSelect ;