Skip to content

Commit bfeaa5c

Browse files
Replace intl prop with hook
1 parent 03206b9 commit bfeaa5c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/components/viewers/nearby/nearby-filter.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Check2 } from '@styled-icons/bootstrap/Check2'
2-
import { IntlShape } from 'react-intl'
2+
import { useIntl } from 'react-intl'
33
import React, { useContext } from 'react'
44
import styled from 'styled-components'
55

@@ -54,15 +54,14 @@ const StyledFilterCheckbox = styled.label<{ checked: boolean }>`
5454

5555
export const FilterCheckboxes = ({
5656
filter,
57-
intl,
5857
onChange,
5958
value
6059
}: {
6160
filter: NearbyFilterConfig
62-
intl: IntlShape
6361
onChange: (arg: React.ChangeEvent<HTMLInputElement>) => void
6462
value: boolean
6563
}): JSX.Element => {
64+
const intl = useIntl()
6665
// @ts-expect-error component context
6766
const { ModeIcon, SvgIcon } = useContext(ComponentContext)
6867
// The icon is either in SvgIcon or ModeIcon so provide both

lib/components/viewers/nearby/nearby-view.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ function NearbyView({
440440
return (
441441
<FilterCheckboxes
442442
filter={filter}
443-
intl={intl}
444443
key={filter.cardType}
445444
onChange={onFilterChange}
446445
value={activeNearbyFilters[filter.cardType]}

0 commit comments

Comments
 (0)