bug fixed
This commit is contained in:
parent
7912815c9e
commit
ae71ce2020
|
@ -51,17 +51,19 @@ export default function ChangePassword({
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
toast.success("Settings Applied!");
|
toast.success("Settings Applied!");
|
||||||
|
|
||||||
if (
|
if (user.email !== account.email) {
|
||||||
user.email !== account.email ||
|
|
||||||
user.username !== account.username ||
|
|
||||||
user.name !== account.name
|
|
||||||
) {
|
|
||||||
update({
|
update({
|
||||||
id: data?.user.id,
|
id: data?.user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
signOut();
|
signOut();
|
||||||
}
|
} else if (
|
||||||
|
user.username !== account.username ||
|
||||||
|
user.name !== account.name
|
||||||
|
)
|
||||||
|
update({
|
||||||
|
id: data?.user.id,
|
||||||
|
});
|
||||||
|
|
||||||
setUser({ ...user, newPassword: undefined });
|
setUser({ ...user, newPassword: undefined });
|
||||||
togglePasswordFormModal();
|
togglePasswordFormModal();
|
||||||
|
|
|
@ -60,17 +60,19 @@ export default function PrivacySettings({
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
toast.success("Settings Applied!");
|
toast.success("Settings Applied!");
|
||||||
|
|
||||||
if (
|
if (user.email !== account.email) {
|
||||||
user.email !== account.email ||
|
|
||||||
user.username !== account.username ||
|
|
||||||
user.name !== account.name
|
|
||||||
) {
|
|
||||||
update({
|
update({
|
||||||
id: data?.user.id,
|
id: data?.user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
signOut();
|
signOut();
|
||||||
}
|
} else if (
|
||||||
|
user.username !== account.username ||
|
||||||
|
user.name !== account.name
|
||||||
|
)
|
||||||
|
update({
|
||||||
|
id: data?.user.id,
|
||||||
|
});
|
||||||
|
|
||||||
setUser({ ...user, newPassword: undefined });
|
setUser({ ...user, newPassword: undefined });
|
||||||
toggleSettingsModal();
|
toggleSettingsModal();
|
||||||
|
|
|
@ -78,17 +78,19 @@ export default function ProfileSettings({
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
toast.success("Settings Applied!");
|
toast.success("Settings Applied!");
|
||||||
|
|
||||||
if (
|
if (user.email !== account.email) {
|
||||||
user.email !== account.email ||
|
|
||||||
user.username !== account.username ||
|
|
||||||
user.name !== account.name
|
|
||||||
) {
|
|
||||||
update({
|
update({
|
||||||
id: data?.user.id,
|
id: data?.user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
signOut();
|
signOut();
|
||||||
}
|
} else if (
|
||||||
|
user.username !== account.username ||
|
||||||
|
user.name !== account.name
|
||||||
|
)
|
||||||
|
update({
|
||||||
|
id: data?.user.id,
|
||||||
|
});
|
||||||
|
|
||||||
setUser({ ...user, newPassword: undefined });
|
setUser({ ...user, newPassword: undefined });
|
||||||
toggleSettingsModal();
|
toggleSettingsModal();
|
||||||
|
@ -174,11 +176,9 @@ export default function ProfileSettings({
|
||||||
</div>
|
</div>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
|
||||||
{user.username !== account.username ||
|
{user.email !== account.email ? (
|
||||||
user.name !== account.name ||
|
|
||||||
user.email !== account.email ? (
|
|
||||||
<p className="text-gray-500">
|
<p className="text-gray-500">
|
||||||
You will need to log back in after you apply the changes.
|
You will need to log back in after you apply this Email.
|
||||||
</p>
|
</p>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -35,8 +35,6 @@ export default function Subscribe() {
|
||||||
update({
|
update({
|
||||||
id: data?.user.id,
|
id: data?.user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
signOut();
|
|
||||||
} else toast.error(response.data as string);
|
} else toast.error(response.data as string);
|
||||||
toast.dismiss(redirectionToast);
|
toast.dismiss(redirectionToast);
|
||||||
setSubmitLoader(false);
|
setSubmitLoader(false);
|
||||||
|
@ -75,10 +73,6 @@ export default function Subscribe() {
|
||||||
className="w-full rounded-md p-2 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"
|
className="w-full rounded-md p-2 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="text-gray-500 text-center">
|
|
||||||
Note that you will have to log back in to complete the process.
|
|
||||||
</p>
|
|
||||||
<div>
|
<div>
|
||||||
<p className="text-md text-gray-500 mt-1">
|
<p className="text-md text-gray-500 mt-1">
|
||||||
Feel free to reach out to us at{" "}
|
Feel free to reach out to us at{" "}
|
||||||
|
|
Ŝarĝante…
Reference in New Issue