Fix default-banner sizing & positioning (#336)

zio/stable
Paul Frazee 2023-03-21 13:03:25 -05:00 committed by GitHub
parent 858d4c8c88
commit 08d513e8c1
1 changed files with 4 additions and 7 deletions

View File

@ -82,12 +82,6 @@ export function UserBanner({
}, },
] ]
const renderSvg = () => (
<Svg width="100%" height="150" viewBox="0 0 400 150">
<Rect x="0" y="0" width="400" height="150" fill="#0070ff" />
</Svg>
)
// setUserBanner is only passed as prop on the EditProfile component // setUserBanner is only passed as prop on the EditProfile component
return onSelectNewBanner ? ( return onSelectNewBanner ? (
<DropdownButton <DropdownButton
@ -118,7 +112,7 @@ export function UserBanner({
source={{uri: banner}} source={{uri: banner}}
/> />
) : ( ) : (
renderSvg() <View style={[styles.bannerImage, styles.defaultBanner]} />
) )
} }
@ -138,4 +132,7 @@ const styles = StyleSheet.create({
width: '100%', width: '100%',
height: 150, height: 150,
}, },
defaultBanner: {
backgroundColor: '#0070ff',
},
}) })