Don't query until we have a username

This commit is contained in:
Justin Edmund 2022-02-28 13:15:14 -08:00
parent bcccfb409a
commit 26fa33c4a7

View file

@ -21,7 +21,8 @@ const ProfileRoute: React.FC = () => {
}) })
useEffect(() => { useEffect(() => {
fetchProfile(username as string) if (username)
fetchProfile(username as string)
}, [username]) }, [username])
async function fetchProfile(username: string) { async function fetchProfile(username: string) {