vn-verdnaturachat/app/views/RoomInfoView/CustomFields.tsx

23 lines
437 B
TypeScript

import React from 'react';
import Item from './Item';
const CustomFields = ({ customFields }: { customFields?: { [key: string]: string } }) => {
if (customFields) {
return (
<>
{Object.keys(customFields).map((title: string) => {
if (!customFields[title]) {
return null;
}
return <Item label={title} content={customFields[title]} />;
})}
</>
);
}
return null;
};
export default CustomFields;