// Copyright (C) 2017-2023 Smart code 203358507
const React = require('react');
const { useTranslation } = require('react-i18next');
const classNames = require('classnames');
const PropTypes = require('prop-types');
const styles = require('./styles.less');
const StatisticsMenu = ({ className, peers, speed, completed, infoHash }) => {
const { t } = useTranslation();
return (
{t('PLAYER_STATISTICS')}
{t('PLAYER_PEERS')}
{ peers }
{t('PLAYER_SPEED')}
{`${speed} ${t('MB_S')}`}
{t('PLAYER_COMPLETED')}
{ Math.min(completed, 100) } %
{t('PLAYER_INFO_HASH')}
{ infoHash }
);
};
StatisticsMenu.propTypes = {
className: PropTypes.string,
peers: PropTypes.number,
speed: PropTypes.number,
completed: PropTypes.number,
infoHash: PropTypes.string,
};
module.exports = StatisticsMenu;