Skip to content

Commit 2ae1555

Browse files
committed
feat: reload
1 parent d7dda82 commit 2ae1555

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

frontend/src/app/settings/page.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,23 @@ const SettingPage = () => {
6363

6464
const onFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
6565
e.preventDefault();
66-
updateProfileUrl(name, preferredLang, selectedImage).then((res) => {
67-
if (res.statusMessage.type.toLowerCase() === "success") {
68-
api.success({
69-
type: "success",
70-
content: "Successfully updated profile!",
71-
});
72-
} else {
73-
api.error({
74-
type: "error",
75-
content: "Failed to update profile :(",
76-
});
77-
}
78-
});
66+
updateProfileUrl(name, preferredLang, selectedImage)
67+
.then((res) => {
68+
if (res.statusMessage.type.toLowerCase() === "success") {
69+
api.success({
70+
type: "success",
71+
content: "Successfully updated profile!",
72+
});
73+
} else {
74+
api.error({
75+
type: "error",
76+
content: "Failed to update profile :(",
77+
});
78+
}
79+
})
80+
.then(() => {
81+
window.location.reload();
82+
});
7983
};
8084

8185
const onEscKeyDown = (e: React.KeyboardEvent<HTMLDialogElement>) => {

0 commit comments

Comments
 (0)