2022-03-03 21:46:53 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import Item from './Item';
|
|
|
|
|
2022-05-11 18:20:59 +00:00
|
|
|
const CustomFields = ({ customFields }: { customFields?: { [key: string]: string } }) => {
|
2022-03-03 21:46:53 +00:00
|
|
|
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;
|