fix and update

This commit is contained in:
lendry
2026-06-30 11:28:10 +03:00
parent c082b087c5
commit df4bbba133
6 changed files with 139 additions and 69 deletions

View File

@@ -51,7 +51,7 @@ export function AddressQuickSection({
const [editingAddress, setEditingAddress] = useState<UserAddress | null>(null);
const loadAddresses = useCallback(async () => {
if (!user || !token || isPinLocked) return;
if (!user || !token || isPinLocked || !isReady) return;
try {
const response = await fetchUserAddresses(user.id, token);
setAddresses(response.addresses ?? []);
@@ -59,7 +59,7 @@ export function AddressQuickSection({
const message = getApiErrorMessage(error, 'Не удалось загрузить адреса');
if (message) showToast(message);
}
}, [isPinLocked, showToast, token, user]);
}, [isPinLocked, isReady, showToast, token, user]);
useEffect(() => {
if (isReady && user && !isPinLocked) void loadAddresses();