Refactor state

This commit is contained in:
2025-11-18 23:21:30 +03:00
Unverified
parent c6c60e6404
commit dc4536cabc
43 changed files with 720 additions and 866 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
import { useState, useCallback, useEffect } from "react";
import { useAppState } from "@/pages/chat/state";
import { useUserStore } from "@/state/user";
import { loadProfile, updateProfile, uploadProfilePicture, type ProfileData } from "@/core/api/account/profile";
import { showSuccess, showError } from "@/utils/notification";
export default function useProfile() {
const { user } = useAppState();
const { user } = useUserStore();
const [profileData, setProfileData] = useState<ProfileData | null>(null);
const [isLoading, setIsLoading] = useState(false);
const [isUpdating, setIsUpdating] = useState(false);