bug fixes + improvements

This commit is contained in:
Daniel
2023-07-16 11:51:24 -04:00
parent c7cfbc3846
commit 4ee74dc232
9 changed files with 35 additions and 14 deletions
+3 -1
View File
@@ -3,7 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClose } from "@fortawesome/free-solid-svg-icons";
import useAccountStore from "@/store/account";
import { AccountSettings } from "@/types/global";
import { useSession } from "next-auth/react";
import { signOut, useSession } from "next-auth/react";
import { resizeImage } from "@/lib/client/resizeImage";
import { faPenToSquare } from "@fortawesome/free-regular-svg-icons";
import SubmitButton from "../../SubmitButton";
@@ -93,6 +93,8 @@ export default function ProfileSettings({
name: user.name,
});
signOut();
if (response.ok) {
setUser({ ...user, newPassword: undefined });
toggleSettingsModal();