fix error when rendering items in premium dialog

This commit is contained in:
ammarahm-ed
2021-11-26 11:45:23 +05:00
parent 0b4e9d1f83
commit c158dd6585

View File

@@ -1,4 +1,4 @@
import React from 'react'; import React, { Fragment } from 'react';
import {View} from 'react-native'; import {View} from 'react-native';
import {allowedPlatforms} from '../../provider/stores'; import {allowedPlatforms} from '../../provider/stores';
import {ProFeatures} from '../ResultDialog/pro-features'; import {ProFeatures} from '../ResultDialog/pro-features';
@@ -47,6 +47,7 @@ const renderItems = {
title: Title, title: Title,
description: Description, description: Description,
body: Body, body: Body,
text:Body,
image: Photo, image: Photo,
list: List, list: List,
subheading: SubHeading, subheading: SubHeading,
@@ -55,7 +56,7 @@ const renderItems = {
}; };
export const renderItem = ({item, index, color,inline}) => { export const renderItem = ({item, index, color,inline}) => {
const Item = renderItems[item.type]; const Item = renderItems[item.type] || Fragment
return <Item key={item.text || item.src || item.type} {...item} index={index} color={color} inline={inline} />; return <Item key={item.text || item.src || item.type} {...item} index={index} color={color} inline={inline} />;
}; };