feat: SW-1583 Optmized after rebase

This commit is contained in:
Hrishikesh Vaipurkar
2025-03-06 17:03:16 +01:00
parent 24bf96df41
commit 585cfdd684
3 changed files with 5 additions and 7 deletions

View File

@@ -275,6 +275,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
const rooms = getValues("rooms")[0]
setValue("rooms", [rooms], { shouldValidate: true })
trigger("bookingCode.value")
trigger(REDEMPTION)
}, 300)
}

View File

@@ -8,9 +8,10 @@ import { REDEMPTION } from "@/constants/booking"
import { ErrorCircleIcon } from "@/components/Icons"
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import { RemoveExtraRooms } from "../BookingCode"
import styles from "./reward-night.module.css"
import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
@@ -97,10 +98,7 @@ export default function RewardNight() {
/>
{intl.formatMessage({ id: redemptionErr.message })}
</Caption>
{isMultiRoomError ? (
// ToDo: Replace with Remove extra rooms JSX element after SW-963 is merged
<Body>{"Remove extra rooms"}</Body>
) : null}
{isMultiRoomError ? <RemoveExtraRooms /> : null}
</div>
)}
</div>