diff --git a/web/pages/profile/index.tsx b/web/pages/profile/index.tsx index 77384ed07..5ac1c02d1 100644 --- a/web/pages/profile/index.tsx +++ b/web/pages/profile/index.tsx @@ -62,16 +62,6 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => { }, [myProfile, reset]); const onSubmit = async (formData: IUser) => { - if (formData.first_name === "" || formData.last_name === "") { - setToastAlert({ - type: "error", - title: "Error!", - message: "First and last names are required.", - }); - - return; - } - const payload: Partial = { first_name: formData.first_name, last_name: formData.last_name, @@ -160,7 +150,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => { )} /> setDeactivateAccountModal(false)} /> -
+
@@ -218,19 +208,24 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
{/* - - - Activity Overview - - */} + + + Activity Overview + + */}
-

First name

+

+ First name * +

( { ref={ref} hasError={Boolean(errors.first_name)} placeholder="Enter your first name" - className="w-full rounded-md" + className={`w-full rounded-md ${errors.first_name ? "border-red-500" : ""}`} /> )} /> + {errors.first_name && Please enter first name}
@@ -270,10 +266,15 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
-

Email

+

+ Email* +

( { ref={ref} hasError={Boolean(errors.email)} placeholder="Enter your email" - className="w-full rounded-md" + className={`w-full rounded-md ${errors.email ? "border-red-500" : ""}`} disabled /> )} @@ -292,17 +293,19 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
-

Role

+

+ Role* +

( {
-

Display name

+

+ Display name* +

{ ref={ref} hasError={Boolean(errors.display_name)} placeholder="Enter your display name" - className="w-full" + className={`w-full ${errors.display_name ? "border-red-500" : ""}`} /> )} /> + {errors.display_name && Please enter display name}
-

Timezone

+

+ Timezone* +

( { options={timeZoneOptions} onChange={onChange} optionsClassName="w-full" - buttonClassName="border-none" + buttonClassName={errors.user_timezone ? "border-red-500" : "border-none"} className="rounded-md border-[0.5px] !border-custom-border-200" input /> )} /> - {errors.role && Please select a role} + {errors.role && Please select a time zone}