import React from 'react';
import propTypes from 'prop-types';
import Module from '../../Module';
import ModuleContentPlaceholder from '../../ModuleContentPlaceholder';
import classes from './style.scss';
const renderDistTags = (distTags) => {
const tags = Object.entries(distTags);
return (
{tags.map((tagItem) => {
const [tag, version] = tagItem;
return (
-
{tag}
{version}
);
})}
);
};
const DistTags = ({distTags = {}}) => {
const hasTags = Object.keys(distTags).length > 0;
return (
{hasTags ? (
renderDistTags(distTags)
) : (
)}
);
};
DistTags.propTypes = {
distTags: propTypes.object,
};
export default DistTags;