2022-03-29 18:53:27 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import Item from './Item';
|
|
|
|
|
2022-05-30 22:01:25 +00:00
|
|
|
const CustomFields = ({ customFields }: { customFields?: { [key: string]: string } }) => {
|
2022-03-29 18:53:27 +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;
|