Rocket.Chat.ReactNative/app/views/RoomInfoView/CustomFields.tsx

23 lines
436 B
TypeScript
Raw Normal View History

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;