From 52159d8cde1c751d06651e922244595ddab45c09 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 May 2023 08:45:24 +0330 Subject: [PATCH] small change --- lib/client/getInitialData.ts | 2 +- store/account.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client/getInitialData.ts b/lib/client/getInitialData.ts index 15fd355..a0acd6e 100644 --- a/lib/client/getInitialData.ts +++ b/lib/client/getInitialData.ts @@ -22,7 +22,7 @@ export default function () { setCollections(); setTags(); setLinks(); - setAccount(data.user.email as string, data.user.id); + setAccount(data.user.email as string); } }, [status]); } diff --git a/store/account.ts b/store/account.ts index 3358ce6..dce5dde 100644 --- a/store/account.ts +++ b/store/account.ts @@ -9,13 +9,13 @@ import { AccountSettings } from "@/types/global"; type AccountStore = { account: User; - setAccount: (email: string, id: number) => void; + setAccount: (email: string) => void; updateAccount: (user: AccountSettings) => Promise; }; const useAccountStore = create()((set) => ({ account: {} as User, - setAccount: async (email, id) => { + setAccount: async (email) => { const response = await fetch(`/api/routes/users?email=${email}`); const data = await response.json();