Skip to content

Commit 797e125

Browse files
committed
Add loading animation for user profile page when current user is undefined
1 parent 83f7d2d commit 797e125

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

web/pages/[username]/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {GetStaticPropsContext} from 'next'
99
import Head from 'next/head'
1010
import {useRouter} from 'next/router'
1111
import {useEffect, useMemo, useState} from 'react'
12+
import {HomeLoadingAnimation} from 'web/components/home/home-loading-animation'
1213
import {Col} from 'web/components/layout/col'
1314
import {PageBase} from 'web/components/page-base'
1415
import {ProfileInfo, ProfileInfoSkeleton} from 'web/components/profile/profile-info'
@@ -312,7 +313,7 @@ function UserPageInner(props: ActiveUserPageProps) {
312313
</Head>
313314
)}
314315

315-
{currentUser !== undefined && (
316+
{currentUser !== undefined ? (
316317
<Col className={'gap-4'}>
317318
{profile ? (
318319
<ProfileInfo
@@ -326,6 +327,8 @@ function UserPageInner(props: ActiveUserPageProps) {
326327
<ProfileInfoSkeleton />
327328
)}
328329
</Col>
330+
) : (
331+
<HomeLoadingAnimation />
329332
)}
330333
</PageBase>
331334
)

0 commit comments

Comments
 (0)