diff --git a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/index.tsx b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/index.tsx index 078a7867b..66865199a 100644 --- a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/index.tsx +++ b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/index.tsx @@ -1,5 +1,5 @@ "use client" -import { FormProvider, useForm } from "react-hook-form" +import { cx } from "class-variance-authority" import { useIntl } from "react-intl" import Caption from "@scandic-hotels/design-system/Caption" @@ -33,28 +33,32 @@ export function VoucherSkeleton() { defaultMessage: "Reward Night", }) - const form = useForm() - return ( - -
-
- - +
+
+ + +
+ +
+
+ + + {vouchers} +
-
-
- - - {reward} - -
+ +
+ + + {reward} +
- +
) } diff --git a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/voucher.module.css b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/voucher.module.css index 4bd9dc0e1..97aef78d7 100644 --- a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/voucher.module.css +++ b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Voucher/voucher.module.css @@ -25,6 +25,10 @@ height: 24px; } +.showOnTablet { + display: none; +} + @media screen and (min-width: 768px) { .options { flex-direction: row; @@ -41,6 +45,15 @@ } } +@media screen and (min-width: 768px) and (max-width: 1366px) { + .voucherSkeletonContainer { + display: none; + } + .showOnTablet { + display: flex; + } +} + @media screen and (min-width: 1367px) { .options { flex-direction: column; diff --git a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/index.tsx b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/index.tsx index 429185a68..0fa254735 100644 --- a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/index.tsx +++ b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/index.tsx @@ -1,5 +1,6 @@ "use client" +import { cx } from "class-variance-authority" import { usePathname } from "next/navigation" import { useFormContext, useWatch } from "react-hook-form" import { useIntl } from "react-intl" @@ -95,7 +96,7 @@ export default function FormContent({
-
+
-
+
-
+
{isMultiRoomError(errors.bookingCode?.value?.message) || isMultiRoomError(errors[SEARCH_TYPE_REDEMPTION]?.message) ? (
@@ -169,7 +170,7 @@ export function BookingWidgetFormContentSkeleton() { )} - +
- +
-
+
+ +
+
-
+