feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass
This commit is contained in:
@@ -61,9 +61,15 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) {
|
||||
label: `${day}`,
|
||||
}))
|
||||
|
||||
const dayLabel = intl.formatMessage({ id: "Day" })
|
||||
const monthLabel = intl.formatMessage({ id: "Month" })
|
||||
const yearLabel = intl.formatMessage({ id: "Year" })
|
||||
const dayLabel = intl.formatMessage({
|
||||
defaultMessage: "Day",
|
||||
})
|
||||
const monthLabel = intl.formatMessage({
|
||||
defaultMessage: "Month",
|
||||
})
|
||||
const yearLabel = intl.formatMessage({
|
||||
defaultMessage: "Year",
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (formState.isSubmitting) return
|
||||
@@ -120,7 +126,9 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) {
|
||||
|
||||
return (
|
||||
<DatePicker
|
||||
aria-label={intl.formatMessage({ id: "Select date of birth" })}
|
||||
aria-label={intl.formatMessage({
|
||||
defaultMessage: "Select date of birth",
|
||||
})}
|
||||
isRequired={!!registerOptions.required}
|
||||
isInvalid={!formState.isValid}
|
||||
name={name}
|
||||
|
||||
Reference in New Issue
Block a user