small change

This commit is contained in:
Daniel
2023-05-23 08:45:24 +03:30
parent 240d92aeae
commit 52159d8cde
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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<boolean>;
};
const useAccountStore = create<AccountStore>()((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();