image.tsx (4060c00a75883036bbd315fb25c90065209312b3) image.tsx (29fe487b627e2da4ad8fab93e4aa0e8c38506f62)
1import React from 'react';
2import {Image, ImageProps} from 'react-native';
3
4interface IImageProps extends ImageProps {
1import React from 'react';
2import {Image, ImageProps} from 'react-native';
3
4interface IImageProps extends ImageProps {
5 uri?: string;
5 uri?: string | null;
6 emptySrc: any;
7}
8export default function (props: Omit<IImageProps, 'source'>) {
9 const {uri, emptySrc} = props;
10 const source = uri
11 ? {
12 uri,
13 }
14 : emptySrc;
15 return <Image {...props} source={source} />;
16}
6 emptySrc: any;
7}
8export default function (props: Omit<IImageProps, 'source'>) {
9 const {uri, emptySrc} = props;
10 const source = uri
11 ? {
12 uri,
13 }
14 : emptySrc;
15 return <Image {...props} source={source} />;
16}