feat: SW-963 Optimized translation id
This commit is contained in:
@@ -23,6 +23,8 @@ import type {
|
||||
} from "@/types/components/bookingWidget"
|
||||
import type { ButtonProps } from "@/components/TempDesignSystem/Button/button"
|
||||
|
||||
const removeExtraRoomsTranslationId = "Remove extra rooms"
|
||||
|
||||
export default function BookingCode() {
|
||||
const intl = useIntl()
|
||||
const checkIsTablet = useMediaQuery(
|
||||
@@ -44,7 +46,9 @@ export default function BookingCode() {
|
||||
const codeVoucher = intl.formatMessage({ id: "Code / Voucher" })
|
||||
const addCode = intl.formatMessage({ id: "Add code" })
|
||||
const ref = useRef<HTMLDivElement | null>(null)
|
||||
const removeExtraRoomsText = intl.formatMessage({ id: "Remove extra rooms" })
|
||||
const removeExtraRoomsText = intl.formatMessage({
|
||||
id: removeExtraRoomsTranslationId,
|
||||
})
|
||||
|
||||
function updateBookingCodeFormValue(value: string) {
|
||||
setValue("bookingCode.value", value, { shouldValidate: true })
|
||||
@@ -268,7 +272,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
|
||||
intent="secondary"
|
||||
{...props}
|
||||
>
|
||||
{intl.formatMessage({ id: "Remove extra rooms" })}
|
||||
{intl.formatMessage({ id: removeExtraRoomsTranslationId })}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user