From fec1589f7c3501689e280023d3606d6b89988a3b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 16 Nov 2022 13:32:10 -0600 Subject: [PATCH] Nicer loading state for profiles --- src/view/com/profile/ProfileHeader.tsx | 46 ++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index 7292deda..5a374376 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -22,6 +22,7 @@ import {s, colors} from '../../lib/styles' import {getGradient} from '../../lib/asset-gen' import {DropdownBtn, DropdownItem} from '../util/DropdownBtn' import Toast from '../util/Toast' +import {LoadingPlaceholder} from '../util/LoadingPlaceholder' import {UserAvatar} from '../util/UserAvatar' import {UserBanner} from '../util/UserBanner' import {UserInfoText} from '../util/UserInfoText' @@ -103,10 +104,49 @@ export const ProfileHeader = observer(function ProfileHeader({ // loading // = - if (!view || (view.isLoading && !view.isRefreshing)) { + if (!view || !view.hasLoaded) { return ( - - + + + {store.nav.tab.canGoBack ? ( + + + + ) : undefined} + {store.me.did ? ( + + + + ) : undefined} + + + + + + + + + + {view.displayName || view.handle} + + + ) }