xref: /MusicFree/src/components/base/fastImage.tsx (revision b882a19d884fffa32f7c8cef31652b909dceaa0f)
1import React from 'react';
2import FastImage, {FastImageProps} from 'react-native-fast-image';
3
4interface IFastImageProps {
5    style: FastImageProps['style'];
6    defaultSource?: FastImageProps['defaultSource'];
7    emptySrc?: number;
8    uri?: string;
9}
10export default function (props: IFastImageProps) {
11    const {style, emptySrc, uri, defaultSource} = props ?? {};
12    const source = uri
13        ? {
14              uri,
15          }
16        : emptySrc;
17    return (
18        <FastImage
19            style={style}
20            source={source}
21            defaultSource={defaultSource}
22        />
23    );
24}
25