fix and update

This commit is contained in:
lendry
2026-06-25 16:01:41 +03:00
parent ce58e6f4c1
commit 3880c68d59
40 changed files with 1715 additions and 215 deletions

View File

@@ -7,7 +7,7 @@ import { AddressQuickSection } from '@/components/addresses/address-quick-sectio
import { DocumentFormDialog } from '@/components/documents/document-form-dialog';
import { ActionTile, SectionTitle } from '@/components/id/action-tile';
import { AdminBadge } from '@/components/id/admin-badge';
import { AvatarUpload } from '@/components/id/avatar-upload';
import { AvatarDisplay } from '@/components/id/avatar-upload';
import { useAuth } from '@/components/id/auth-provider';
import { IdShell } from '@/components/id/shell';
import { Button } from '@/components/ui/button';
@@ -17,7 +17,7 @@ import { apiFetch, UserDocument } from '@/lib/api';
export default function HomePage() {
const router = useRouter();
const { user, token, refreshProfile, isPinLocked } = useAuth();
const { user, token, isPinLocked } = useAuth();
const { isReady } = useRequireAuth();
const contactLine = [user?.phone, user?.username ?? user?.email].filter(Boolean).join(' · ');
const [documents, setDocuments] = useState<UserDocument[]>([]);
@@ -55,12 +55,15 @@ export default function HomePage() {
<IdShell active="/" wide>
<div className="flex flex-col items-center">
{user ? (
<AvatarUpload
<AvatarDisplay
userId={user.id}
displayName={user.displayName}
hasAvatar={user.hasAvatar}
token={token}
onUpdated={refreshProfile}
isVerified={user.isVerified}
verificationIcon={user.verificationIcon}
className="h-24 w-24 border-4 border-white shadow-xl"
badgeSize="md"
/>
) : (
<div className="h-24 w-24 rounded-full bg-[#f4f5f8]" />