chore: replace function expression with inline statement
replace destructuring for better static analysis remove unused variables
This commit is contained in:
@@ -34,7 +34,7 @@ export default function CountrySelect({
|
||||
readOnly = false,
|
||||
registerOptions = {},
|
||||
}: CountryProps) {
|
||||
const { formatMessage } = useIntl()
|
||||
const intl = useIntl()
|
||||
const [rootDiv, setRootDiv] = useState<CountryPortalContainer>(undefined)
|
||||
|
||||
function setRef(node: CountryPortalContainerArgs) {
|
||||
@@ -53,13 +53,12 @@ export default function CountrySelect({
|
||||
setValue(name, country)
|
||||
}
|
||||
|
||||
const selectCountryLabel = formatMessage({ id: "Select a country" })
|
||||
const selectCountryLabel = intl.formatMessage({ id: "Select a country" })
|
||||
|
||||
return (
|
||||
<div className={`${styles.container} ${className}`} ref={setRef}>
|
||||
<ComboBox
|
||||
aria-label={formatMessage({ id: "Select country of residence" })}
|
||||
className={styles.select}
|
||||
aria-label={intl.formatMessage({ id: "Select country of residence" })}
|
||||
isInvalid={fieldState.invalid}
|
||||
isReadOnly={readOnly}
|
||||
isRequired={!!registerOptions?.required}
|
||||
|
||||
Reference in New Issue
Block a user