feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass

This commit is contained in:
Michael Zetterberg
2025-02-07 06:51:36 +01:00
parent e22fc1f3c8
commit 440e1f92df
393 changed files with 4839 additions and 1554 deletions

View File

@@ -5,13 +5,21 @@ import { Periods } from "@/types/components/hotelPage/sidepeek/parking"
export function getPeriod(intl: IntlShape, period?: string) {
switch (period) {
case Periods.hour:
return intl.formatMessage({ id: "Price per hour" })
return intl.formatMessage({
defaultMessage: "Price per hour",
})
case Periods.day:
return intl.formatMessage({ id: "Price per day" })
return intl.formatMessage({
defaultMessage: "Price per day",
})
case Periods.night:
return intl.formatMessage({ id: "Price per night" })
return intl.formatMessage({
defaultMessage: "Price per night",
})
case Periods.allDay:
return intl.formatMessage({ id: "Price per 24 hours" })
return intl.formatMessage({
defaultMessage: "Price per 24 hours",
})
default:
return period
}