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 {allowedPlatforms} from '../../provider/stores';
import {ProFeatures} from '../ResultDialog/pro-features';
@@ -47,6 +47,7 @@ const renderItems = {
title: Title,
description: Description,
body: Body,
text:Body,
image: Photo,
list: List,
subheading: SubHeading,
@@ -55,7 +56,7 @@ const renderItems = {
};
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} />;
};