testing 127.0.0.1 issue

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-07 13:40:07 +08:00
parent 244aa607f7
commit 6624c0d27f
62 changed files with 662 additions and 1889 deletions
+7 -39
View File
@@ -63,21 +63,11 @@ function SecuritySection({ user, logout }) {
const handleSubmit = async (e) => {
e.preventDefault();
if (form.new_password !== form.confirm) {
toast("New passwords do not match.", {
action: {
label: "Close",
onClick: () => {}
}
});
toast("New passwords do not match.");
return;
}
if (form.new_password.length < 8) {
toast("New password must be at least 8 characters.", {
action: {
label: "Close",
onClick: () => {}
}
});
toast("New password must be at least 8 characters.");
return;
}
setLoading(true);
@@ -86,23 +76,13 @@ function SecuritySection({ user, logout }) {
current_password: form.current_password,
new_password: form.new_password,
});
toast("Password changed. Logging you out…", {
action: {
label: "Close",
onClick: () => {}
}
});
toast("Password changed. Logging you out…");
setTimeout(async () => {
await logout();
navigate("/login");
}, 1500);
} catch (err) {
toast(err?.response?.data?.message ?? "Could not change password.", {
action: {
label: "Close",
onClick: () => {}
}
});
toast(err?.response?.data?.message ?? "Could not change password.");
} finally {
setLoading(false);
}
@@ -288,11 +268,7 @@ function AdvertisementsSection() {
const result = await updateProfile({ [key]: value });
if (result?.success) {
toast("Preference saved.", {
description: "Reload the page for this to take effect.",
action: {
label: "Close",
onClick: () => {}
}
description: "Reload the page for this to take effect."
});
}
};
@@ -302,11 +278,7 @@ function AdvertisementsSection() {
const result = await updateProfile({ show_popup_ads: false, show_other_ads: false });
if (result?.success) {
toast("Preference saved.", {
description: "Reload the page for this to take effect.",
action: {
label: "Close",
onClick: () => {}
}
description: "Reload the page for this to take effect."
});
}
};
@@ -315,11 +287,7 @@ function AdvertisementsSection() {
const result = await updateProfile({ show_popup_ads: !hide, show_other_ads: !hide });
if (result?.success) {
toast("Preference saved.", {
description: "Reload the page for this to take effect.",
action: {
label: "Close",
onClick: () => {}
}
description: "Reload the page for this to take effect."
});
}
};