Merged in fix/STAY-17-find-my-booking-errors (pull request #3181)
fix: improve error messages in find my booking flow * fix: improve error messages in find my booking flow Approved-by: Linus Flood Approved-by: Erik Tiekstra
This commit is contained in:
@@ -5,9 +5,7 @@ import { useRouter } from "next/navigation"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import Title from "@scandic-hotels/design-system/Title"
|
||||
import { Button } from "@scandic-hotels/design-system/Button"
|
||||
|
||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||
|
||||
@@ -15,6 +13,7 @@ import {
|
||||
type AdditionalInfoFormSchema,
|
||||
additionalInfoFormSchema,
|
||||
} from "./schema"
|
||||
import { Title } from "./Title"
|
||||
|
||||
import styles from "./findMyBooking.module.css"
|
||||
|
||||
@@ -51,20 +50,7 @@ export default function AdditionalInfoForm({
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)} className={styles.form}>
|
||||
<div>
|
||||
<Title level="h2" as="h3">
|
||||
{intl.formatMessage({
|
||||
id: "hotelReservation.findMyBooking.title",
|
||||
defaultMessage: "Find your booking",
|
||||
})}
|
||||
</Title>
|
||||
<Body>
|
||||
{intl.formatMessage({
|
||||
id: "hotelReservation.findMyBooking.additionalInfoText",
|
||||
defaultMessage: "We need some details to confirm your identity.",
|
||||
})}
|
||||
</Body>
|
||||
</div>
|
||||
<Title isAdditional />
|
||||
<div className={styles.inputs}>
|
||||
<Input
|
||||
label={intl.formatMessage({
|
||||
@@ -87,9 +73,9 @@ export default function AdditionalInfoForm({
|
||||
<div className={styles.buttons}>
|
||||
<Button
|
||||
type="submit"
|
||||
intent="primary"
|
||||
theme="base"
|
||||
disabled={form.formState.isSubmitting}
|
||||
variant="Primary"
|
||||
size="Medium"
|
||||
isDisabled={form.formState.isSubmitting}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.confirm",
|
||||
|
||||
Reference in New Issue
Block a user