diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index 921abd10..0ff086ac 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -6,7 +6,7 @@ import Error from 'next/error' export default function UserProfile() { const router = useRouter() - const [user, setUser] = useState(null) + const [user, setUser] = useState('loading') const atUsername = router.query.username as string | undefined const username = atUsername?.substring(1) || '' // Remove the initial @ useEffect(() => { @@ -16,6 +16,9 @@ export default function UserProfile() { }, [username]) const errorMessage = `Who is this "${username}" you speak of..` + + if (user === 'loading') return <> + return user ? ( ) : (