import { motion } from "framer-motion"; import { Link, useParams } from "wouter"; import { useQuery } from "@tanstack/react-query"; import { ArrowLeft, Shield, Zap, ExternalLink, Github, Twitter, Globe, Award, Code, User, Loader2, AlertCircle } from "lucide-react"; interface ArchitectProfile { id: string; name: string; role: string; bio: string | null; level: number; xp: number; passportId: string | null; skills: string[] | null; isVerified: boolean; avatarUrl: string | null; github: string | null; twitter: string | null; website: string | null; } export default function NetworkProfile() { const params = useParams<{ slug: string }>(); const slug = params.slug; const { data: profile, isLoading, error } = useQuery({ queryKey: ['architect', slug], queryFn: async () => { const res = await fetch(`/api/directory/architects/${slug}`); if (!res.ok) { throw new Error('Architect not found'); } return res.json(); }, enabled: !!slug, }); if (isLoading) { return (
); } if (error || !profile) { return (

Architect Not Found

The requested profile does not exist in our directory.

); } return (
{profile.avatarUrl ? ( {profile.name} ) : ( )}

{profile.name} {profile.isVerified && ( )}

{profile.role}

{profile.passportId && (
Passport ID

{profile.passportId}

)}
Level

{profile.level || 1}

XP

{profile.xp?.toLocaleString() || 0}

{profile.bio && (

Bio

{profile.bio}

)} {profile.skills && profile.skills.length > 0 && (

Skills

{profile.skills.map((skill) => ( {skill} ))}
)} {(profile.github || profile.twitter || profile.website) && (
{profile.github && ( GitHub )} {profile.twitter && ( Twitter )} {profile.website && ( Website )}
)}
AeThex Network // Architect Profile
); }