14 lines
324 B
JavaScript
14 lines
324 B
JavaScript
import { types } from './types';
|
|||
|
|||
export const ImageComponent = (type) => {
|
|||
let Component;
|
|||
if (type === types.REACT_NATIVE_IMAGE) {
|
|||
const { Image } = require('react-native');
|
|||
Component = Image;
|
|||
} else {
|
|||
const FastImage = require('react-native-fast-image').default;
|
|||
Component = FastImage;
|
|||
}
|
|||
return Component;
|
|||
};
|