feat: SW-276 Updated translations
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client"
|
||||
import { useState } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
@@ -23,9 +24,11 @@ export default function GuestsRoomsPicker({
|
||||
},
|
||||
],
|
||||
closePicker,
|
||||
childAgeError,
|
||||
isValid,
|
||||
}: GuestsRoomsPickerProps) {
|
||||
const lang = useLang()
|
||||
const intl = useIntl()
|
||||
const doneLabel = intl.formatMessage({ id: "Done" })
|
||||
const [selectedGuests, setSelectedGuests] =
|
||||
useState<GuestsRoom[]>(initialSelected)
|
||||
|
||||
@@ -39,6 +42,7 @@ export default function GuestsRoomsPicker({
|
||||
setSelectedGuests(updatedSelectedGuests)
|
||||
}
|
||||
|
||||
// Not in MVP scope
|
||||
function addRoom() {
|
||||
if (selectedGuests.length < 4) {
|
||||
let updatedSelectedGuests = JSON.parse(JSON.stringify(selectedGuests))
|
||||
@@ -51,6 +55,7 @@ export default function GuestsRoomsPicker({
|
||||
}
|
||||
}
|
||||
|
||||
// Not in MVP scope
|
||||
function removeRoom(index: number) {
|
||||
if (selectedGuests.length > 1) {
|
||||
let updatedSelectedGuests = JSON.parse(JSON.stringify(selectedGuests))
|
||||
@@ -68,7 +73,7 @@ export default function GuestsRoomsPicker({
|
||||
room={room}
|
||||
handleOnSelect={handleSelectRoomGuests}
|
||||
index={index}
|
||||
childAgeError={childAgeError}
|
||||
isValid={isValid}
|
||||
/>
|
||||
{/* Not in MVP
|
||||
{index > 0 ? (
|
||||
@@ -86,7 +91,9 @@ export default function GuestsRoomsPicker({
|
||||
Add Room
|
||||
</Button>
|
||||
) : null} */}
|
||||
<Button onClick={closePicker}>Done</Button>
|
||||
<Button onClick={closePicker} disabled={!isValid}>
|
||||
{doneLabel}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user