Add profile loading shim (#1940)
This commit is contained in:
parent
22df70b3cc
commit
f89dc63801
3 changed files with 26 additions and 22 deletions
|
|
@ -11,12 +11,14 @@ import {s} from 'lib/styles'
|
|||
import {useModerationOpts} from '#/state/queries/preferences'
|
||||
import {useProfileQuery} from '#/state/queries/profile'
|
||||
import {ErrorScreen} from '../util/error/ErrorScreen'
|
||||
import {CenteredView} from '../util/Views'
|
||||
import {cleanError} from '#/lib/strings/errors'
|
||||
import {useProfileShadow} from '#/state/cache/profile-shadow'
|
||||
|
||||
export const snapPoints = [520, '100%']
|
||||
|
||||
export function Component({did}: {did: string}) {
|
||||
const pal = usePalette('default')
|
||||
const moderationOpts = useModerationOpts()
|
||||
const {
|
||||
data: profile,
|
||||
|
|
@ -30,9 +32,13 @@ export function Component({did}: {did: string}) {
|
|||
|
||||
if (isFetchingProfile || !moderationOpts) {
|
||||
return (
|
||||
<View style={s.p20}>
|
||||
<ActivityIndicator size="large" />
|
||||
</View>
|
||||
<CenteredView style={[pal.view, s.flex1]}>
|
||||
<ProfileHeader
|
||||
profile={null}
|
||||
moderation={null}
|
||||
isProfilePreview={true}
|
||||
/>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
if (profileError) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue