Skip to content

Scheduling infrastructure for absolutely everyone.

fix: loader animation in profile update button (#9162)

VasuDevrani6daa69cff9bd
diff --git a/apps/web/pages/settings/my-account/profile.tsx b/apps/web/pages/settings/my-account/profile.tsx
index 6116bcaa9d8..a9dde1a8c83 100644
--- a/apps/web/pages/settings/my-account/profile.tsx
+++ b/apps/web/pages/settings/my-account/profile.tsx
@@ -203,6 +203,7 @@ const ProfileView = () => {
<ProfileForm
key={JSON.stringify(defaultValues)}
defaultValues={defaultValues}
+ isLoading={mutation.isLoading}
onSubmit={(values) => {
if (values.email !== user.email && isCALIdentityProviver) {
setTempFormValues(values);
@@ -314,10 +315,12 @@ const ProfileForm = ({
defaultValues,
onSubmit,
extraField,
+ isLoading = false,
}: {
defaultValues: FormValues;
onSubmit: (values: FormValues) => void;
extraField?: React.ReactNode;
+ isLoading: boolean;
}) => {
const { t } = useLocale();
const [firstRender, setFirstRender] = useState(true);
@@ -390,7 +393,7 @@ const ProfileForm = ({
setFirstRender={setFirstRender}
/>
</div>
- <Button disabled={isDisabled} color="primary" className="mt-8" type="submit">
+ <Button loading={isLoading} disabled={isDisabled} color="primary" className="mt-8" type="submit">
{t("update")}
</Button>
</Form>