weight and height default values to null
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import { loadCurrentUserAccount } from '@/app/home/(user)/_lib/server/load-user-account';
|
||||
import { signOutAction } from '@/lib/actions/sign-out';
|
||||
|
||||
import { BackButton } from '@kit/shared/components/back-button';
|
||||
@@ -8,10 +9,9 @@ import { pathsConfig } from '@kit/shared/config';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
import { toTitleCase } from '~/lib/utils';
|
||||
|
||||
import { UpdateAccountForm } from './_components/update-account-form';
|
||||
import { loadCurrentUserAccount } from '@/app/home/(user)/_lib/server/load-user-account';
|
||||
import { toTitleCase } from '~/lib/utils';
|
||||
|
||||
async function UpdateAccount() {
|
||||
const { account, user } = await loadCurrentUserAccount();
|
||||
@@ -35,14 +35,14 @@ async function UpdateAccount() {
|
||||
})(),
|
||||
phone: account?.phone ?? '+372',
|
||||
city: account?.city ?? '',
|
||||
weight: account?.accountParams?.weight ?? 0,
|
||||
height: account?.accountParams?.height ?? 0,
|
||||
weight: account?.accountParams?.weight ?? null,
|
||||
height: account?.accountParams?.height ?? null,
|
||||
userConsent: account?.has_consent_personal_data ?? false,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="border-border flex max-w-5xl flex-row overflow-hidden rounded-3xl border">
|
||||
<div className="relative flex min-w-md flex-col px-12 pt-7 pb-22 text-center md:w-1/2">
|
||||
<div className="relative flex w-full flex-col px-12 pt-7 pb-22 text-center">
|
||||
<BackButton onBack={signOutAction} />
|
||||
<MedReportLogo />
|
||||
<h1 className="pt-8">
|
||||
@@ -51,7 +51,10 @@ async function UpdateAccount() {
|
||||
<p className="text-muted-foreground pt-1 text-sm">
|
||||
<Trans i18nKey={'account:updateAccount:description'} />
|
||||
</p>
|
||||
<UpdateAccountForm defaultValues={defaultValues} isEmailUser={isEmailUser} />
|
||||
<UpdateAccountForm
|
||||
defaultValues={defaultValues}
|
||||
isEmailUser={isEmailUser}
|
||||
/>
|
||||
</div>
|
||||
<div className="hidden w-1/2 min-w-[460px] bg-[url(/assets/med-report-logo-big.png)] bg-cover bg-center bg-no-repeat md:block"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user