This commit is contained in:
Zhiyuan Zheng 2022-06-21 23:50:49 +02:00
parent 29977b6c9e
commit 0f8befc89c
1 changed files with 3 additions and 7 deletions

View File

@ -1,9 +1,8 @@
import Button from '@components/Button'
import { useAccessibility } from '@utils/accessibility/AccessibilityManager'
import GracefullyImage from '@components/GracefullyImage'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { Dimensions, View } from 'react-native'
import FastImage from 'react-native-fast-image'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
export interface Props {
@ -13,16 +12,13 @@ export interface Props {
const AccountHeader = React.memo(
({ account, edit }: Props) => {
const { reduceMotionEnabled } = useAccessibility()
const { colors } = useTheme()
const topInset = useSafeAreaInsets().top
return (
<View>
<FastImage
source={{
uri: reduceMotionEnabled ? account?.header_static : account?.header
}}
<GracefullyImage
uri={{ original: account?.header, static: account?.header_static }}
style={{
height: Dimensions.get('screen').width / 3 + topInset,
backgroundColor: colors.disabled