mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:24:56 -06:00
fix uri should not be undefined warning
This commit is contained in:
parent
8a0e2dc187
commit
5c85ce9982
2 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ import { View, Image } from 'react-native';
|
||||||
import { pure } from 'recompose';
|
import { pure } from 'recompose';
|
||||||
|
|
||||||
export default pure(({ uri }: { uri?: string }) => (
|
export default pure(({ uri }: { uri?: string }) => (
|
||||||
<View style={{ position: 'absolute', top: 0, bottom: 0, left: 0, right: 0 }}>
|
<View style={{ position: 'absolute', top: 0, bottom: 0, left: 0, right: 0 }}>
|
||||||
<Image style={{ flex: 1, resizeMode: 'stretch' }} source={{ uri }} />
|
{!!uri && <Image style={{ flex: 1, resizeMode: 'stretch' }} source={{ uri }} />}
|
||||||
</View>
|
</View>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { View, Image } from 'react-native';
|
||||||
import { pure } from 'recompose';
|
import { pure } from 'recompose';
|
||||||
|
|
||||||
export default pure(({ uri, style }: { uri: string, style?: Object }) => (
|
export default pure(({ uri, style }: { uri: string, style?: Object }) => (
|
||||||
<View style={{ height: 50, width: 50, margin: 10, backgroundColor: 'grey', ...style }}>
|
<View style={{ height: 50, width: 50, margin: 10, backgroundColor: 'grey', ...style }}>
|
||||||
<Image source={{ uri }} style={{ flex: 1, resizeMode: 'stretch' }} />
|
{!!uri && <Image source={{ uri }} style={{ flex: 1, resizeMode: 'stretch' }} />}
|
||||||
</View>
|
</View>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue