import React from 'react' import DownloadHandler from '../../../utils/download' import ProgressBar from './ProgressBar' import './DownloadSection.css' interface IProps { downloadManager: DownloadHandler downloadName: string } export default class DownloadSection extends React.Component { constructor(props: IProps) { super(props) } getFilenameFromPath() { const name = this.props.downloadName.replace(/\\/g, '/') return name.split('/').pop() } render() { return (
{this.getFilenameFromPath()}
- {this.props.downloadManager.getDownloadSize(this.props.downloadName)}
) } }