fix and update

This commit is contained in:
lendry
2026-06-30 14:12:20 +03:00
parent 2a88c87e94
commit 879875508f
7 changed files with 45 additions and 25 deletions

View File

@@ -124,13 +124,13 @@ export default function DataPage() {
}, [user]);
useEffect(() => {
if (!user || !token || isPinLocked) return;
if (!isReady || !user || !token || isPinLocked) return;
void apiFetch<UserProfileResponse>(`/profile/users/${user.id}`, {}, token)
.then((profile) => {
if (profile.birthDate) setBirthDate(profile.birthDate);
})
.catch(() => undefined);
}, [isPinLocked, token, user]);
}, [isPinLocked, isReady, token, user]);
useEffect(() => {
if (isReady && user && !isPinLocked) void loadDocuments();