Skip to content

Commit

Permalink
fix brach commit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidSumra committed Oct 18, 2024
1 parent 8bb5120 commit de06f49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/Components/Form/FormFields/PhoneNumberFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export default function PhoneNumberFormField(props: Props) {
}
}, [setValue]);

useEffect(() => {
setValue(field.value || "+91");
}, []);

return (
<FormField
field={{
Expand Down
9 changes: 1 addition & 8 deletions src/Components/Users/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export default function UserProfile() {
isChecking: false,
isUpdateAvailable: false,
});
const [dirty, setDirty] = useState<boolean>(false);

const authUser = useAuthUser();

Expand Down Expand Up @@ -173,7 +172,6 @@ export default function UserProfile() {
type: "set_form",
form: formData,
});
setDirty(false);
},
});

Expand Down Expand Up @@ -326,7 +324,6 @@ export default function UserProfile() {
type: "set_form",
form: { ...states.form, [event.name]: event.value },
});
setDirty(true);
};

const getDate = (value: any) =>
Expand Down Expand Up @@ -791,11 +788,7 @@ export default function UserProfile() {
</div>
</div>
<div className="bg-secondary-50 px-4 py-3 text-right sm:px-6">
<Submit
onClick={handleSubmit}
label={t("update")}
disabled={!dirty}
/>
<Submit onClick={handleSubmit} label={t("update")} />
</div>
</div>
</form>
Expand Down

0 comments on commit de06f49

Please sign in to comment.