fix: mobile form ui and parse phone number bug
This commit is contained in:
@@ -61,41 +61,47 @@ export default function Form({ user }: EditFormProps) {
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header>
|
||||
<hgroup>
|
||||
<Title as="h4" color="red" level="h1" textTransform="capitalize">
|
||||
{formatMessage({ id: "Welcome" })}
|
||||
</Title>
|
||||
<Title as="h4" color="burgundy" level="h2" textTransform="capitalize">
|
||||
{user.name}
|
||||
</Title>
|
||||
</hgroup>
|
||||
<div className={styles.btns}>
|
||||
<Button asChild intent="secondary" size="small" theme="base">
|
||||
<Link href={profile[lang]}>
|
||||
{formatMessage({ id: "Discard changes" })}
|
||||
</Link>
|
||||
</Button>
|
||||
<Button
|
||||
disabled={
|
||||
!methods.formState.isValid || methods.formState.isSubmitting
|
||||
}
|
||||
form={formId}
|
||||
intent="primary"
|
||||
size="small"
|
||||
theme="base"
|
||||
type="submit"
|
||||
>
|
||||
{formatMessage({ id: "Save" })}
|
||||
</Button>
|
||||
</div>
|
||||
</Header>
|
||||
<section className={styles.container}>
|
||||
<hgroup className={styles.title}>
|
||||
<Title as="h4" color="red" level="h1" textTransform="capitalize">
|
||||
{formatMessage({ id: "Welcome" })}
|
||||
</Title>
|
||||
<Title as="h4" color="burgundy" level="h2" textTransform="capitalize">
|
||||
{user.name}
|
||||
</Title>
|
||||
</hgroup>
|
||||
<div className={styles.btnContainer}>
|
||||
<Button
|
||||
asChild
|
||||
intent="secondary"
|
||||
size="small"
|
||||
theme="base"
|
||||
className={styles.btn}
|
||||
>
|
||||
<Link href={profile[lang]}>
|
||||
{formatMessage({ id: "Discard changes" })}
|
||||
</Link>
|
||||
</Button>
|
||||
<Button
|
||||
disabled={
|
||||
!methods.formState.isValid || methods.formState.isSubmitting
|
||||
}
|
||||
className={styles.btn}
|
||||
form={formId}
|
||||
intent="primary"
|
||||
size="small"
|
||||
theme="base"
|
||||
type="submit"
|
||||
>
|
||||
{formatMessage({ id: "Save" })}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<form action={formAction} className={styles.form} id={formId}>
|
||||
<FormProvider {...methods}>
|
||||
<FormContent />
|
||||
</FormProvider>
|
||||
</form>
|
||||
</>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user