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