refactored how avatars are being handled

This commit is contained in:
daniel31x13
2023-10-28 00:45:14 -04:00
parent f9eedadb9f
commit cdcfabec0b
21 changed files with 55 additions and 85 deletions
+1 -3
View File
@@ -19,9 +19,7 @@ const useAccountStore = create<AccountStore>()((set) => ({
const data = await response.json();
const profilePic = `/api/v1/avatar/${data.response.id}?${Date.now()}`;
if (response.ok) set({ account: { ...data.response, profilePic } });
if (response.ok) set({ account: { ...data.response } });
},
updateAccount: async (user) => {
const response = await fetch(`/api/v1/users/${user.id}`, {