Add Artist (discography) size, and show sizes in Download caption

This commit is contained in:
Deluan
2020-10-12 21:21:28 -04:00
parent 1ffc8d619e
commit 68a9be5e86
7 changed files with 70 additions and 16 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ const SizeField = ({ record = {}, source }) => {
return <span>{formatBytes(record[source])}</span>
}
function formatBytes(bytes, decimals = 2) {
export const formatBytes = (bytes, decimals = 2) => {
if (bytes === 0) return '0 Bytes'
const k = 1024