diff --git a/src/pages/DashboardPage.tsx b/src/pages/DashboardPage.tsx index bba2396..5ecc5ea 100644 --- a/src/pages/DashboardPage.tsx +++ b/src/pages/DashboardPage.tsx @@ -4,8 +4,9 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' import { Button } from '@/components/ui/button' import { Volume2, Play, Clock, HardDrive, Music, Trophy, Loader2, RefreshCw } from 'lucide-react' -import { formatDuration, formatFileSize } from '@/lib/format' +import { formatDuration } from '@/lib/format' import NumberFlow from '@number-flow/react' +import { formatSizeObject } from '@/utils/format-size' interface SoundboardStatistics { sound_count: number @@ -271,7 +272,7 @@ export function DashboardPage() { -
{soundboardStatistics.sound_count}
+

Soundboard audio files

@@ -310,7 +311,16 @@ export function DashboardPage() { -
{formatFileSize(soundboardStatistics.total_size)}
+
+ {(() => { + const sizeObj = formatSizeObject(soundboardStatistics.total_size, true) + return ( + <> + {sizeObj.unit} + + ) + })()} +

Original + normalized files

@@ -329,7 +339,7 @@ export function DashboardPage() { -
{trackStatistics.track_count}
+

Extracted audio tracks

@@ -342,7 +352,7 @@ export function DashboardPage() { -
{trackStatistics.total_play_count}
+

All-time play count

@@ -368,7 +378,16 @@ export function DashboardPage() { -
{formatFileSize(trackStatistics.total_size)}
+
+ {(() => { + const sizeObj = formatSizeObject(trackStatistics.total_size, true) + return ( + <> + {sizeObj.unit} + + ) + })()} +

Original + normalized files