TorrentListCell: properly handle classnames

This commit is contained in:
Jesse Chan
2020-10-27 14:13:06 +08:00
parent 067057cb2f
commit 6ac87954da
@@ -1,3 +1,4 @@
import classnames from 'classnames';
import React from 'react';
import DetailNotAvailableIcon from '../icons/DetailNotAvailableIcon';
@@ -23,7 +24,9 @@ const TorrentListCell: React.FC<TorrentListCellProps> = ({
const icon = showIcon ? torrentPropertyIcons[column as keyof typeof torrentPropertyIcons] : null;
return (
<div className={`torrent__detail torrent__detail--${column} ${className}`} style={{width: `${width}px`}}>
<div
className={classnames('torrent__detail', `torrent__detail--${column}`, className)}
style={{width: `${width}px`}}>
{icon}
{content || <DetailNotAvailableIcon />}
</div>