import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; class ExportingProgressBar extends React.Component { render() { const { collectionName, currentCount, totalCount } = this.props; const percentage = currentCount / totalCount * 100; const isActive = currentCount !== totalCount; return ( <>
{collectionName}
{currentCount} / {totalCount}
{percentage.toFixed(0)}% Complete
); } } ExportingProgressBar.propTypes = { collectionName: PropTypes.string.isRequired, currentCount: PropTypes.number.isRequired, totalCount: PropTypes.number.isRequired, }; export default withTranslation()(ExportingProgressBar);