Don't query until we have a username
This commit is contained in:
parent
bcccfb409a
commit
26fa33c4a7
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue