Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

small improvements

Daniel10727937b5b5
diff --git a/components/Modal/UserSettings.tsx b/components/Modal/UserSettings.tsx
index 3c1b308e..31213d2a 100644
--- a/components/Modal/UserSettings.tsx
+++ b/components/Modal/UserSettings.tsx
@@ -84,18 +84,16 @@ export default function UserSettings({ toggleSettingsModal }: Props) {
};
const submit = async () => {
- console.log(user);
-
- await updateAccount({
+ const response = await updateAccount({
...user,
});
- console.log(account);
-
setPasswordForm(undefined, undefined);
if (user.email !== account.email || user.name !== account.name)
update({ email: user.email, name: user.name });
+
+ if (response) toggleSettingsModal();
};
return (
@@ -104,13 +102,6 @@ export default function UserSettings({ toggleSettingsModal }: Props) {
<p className="text-sky-600">Profile Settings</p>
- {user.email !== account.email || user.name !== account.name ? (
- <p className="text-gray-500 text-sm sm:w-1/2">
- Note: The page will be refreshed to apply the changes of "Email" or
- "Display Name".
- </p>
- ) : null}
-
<div className="grid sm:grid-cols-2 gap-3 auto-rows-auto">
<div className="flex flex-col gap-3">
<div>
diff --git a/store/account.ts b/store/account.ts
index bda6a151..ddd13a41 100644
--- a/store/account.ts
+++ b/store/account.ts
@@ -4,7 +4,6 @@
// You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
import { create } from "zustand";
-import { User } from "@prisma/client";
import { AccountSettings } from "@/types/global";
import avatarExists from "@/lib/client/avatarExists";