Fixed human-readable file size representation (#137)

(as it follows units of IEC 60027-2 A.2 )
This commit is contained in:
0x6d61726b
2024-03-03 15:48:56 +01:00
committed by GitHub
parent f763b9657f
commit 51bcd82ea7
5 changed files with 20 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
import StorageIcon from '@mui/icons-material/Storage'
import { useRecoilValue } from 'recoil'
import { freeSpaceBytesState } from '../atoms/status'
import { formatGiB } from '../utils'
import { formatSize } from '../utils'
const FreeSpaceIndicator = () => {
const freeSpace = useRecoilValue(freeSpaceBytesState)
@@ -15,7 +15,7 @@ const FreeSpaceIndicator = () => {
}}>
<StorageIcon />
<span>
{formatGiB(freeSpace)}
{formatSize(freeSpace)}
</span>
</div>
)