You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import sortByName from 'Utilities/Array/sortByName';
|
|
import FieldSet from 'Components/FieldSet';
|
|
import PageSectionContent from 'Components/Page/PageSectionContent';
|
|
import Metadata from './Metadata';
|
|
import styles from './Metadatas.css';
|
|
|
|
function Metadatas(props) {
|
|
const {
|
|
items,
|
|
...otherProps
|
|
} = props;
|
|
|
|
return (
|
|
<FieldSet
|
|
legend="Metadata Consumers"
|
|
>
|
|
<PageSectionContent
|
|
errorMessage="Unable to load Metadata"
|
|
{...otherProps}
|
|
>
|
|
<div className={styles.metadatas}>
|
|
{
|
|
items.sort(sortByName).map((item) => {
|
|
return (
|
|
<Metadata
|
|
key={item.id}
|
|
{...item}
|
|
/>
|
|
);
|
|
})
|
|
}
|
|
</div>
|
|
</PageSectionContent>
|
|
</FieldSet>
|
|
);
|
|
}
|
|
|
|
Metadatas.propTypes = {
|
|
isFetching: PropTypes.bool.isRequired,
|
|
error: PropTypes.object,
|
|
items: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
};
|
|
|
|
export default Metadatas;
|