feat: add formatDuration and formatSize utility functions for improved time and size formatting
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
Minimize2,
|
||||
Minus
|
||||
} from 'lucide-react'
|
||||
import { formatDuration } from '@/lib/format-duration'
|
||||
|
||||
export function MusicPlayer() {
|
||||
const {
|
||||
@@ -179,8 +180,8 @@ export function MusicPlayer() {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-between text-xs text-muted-foreground">
|
||||
<span>{formatTime(currentTime)}</span>
|
||||
<span>{formatTime(duration)}</span>
|
||||
<span>{formatDuration(currentTime)}</span>
|
||||
<span>{formatDuration(duration)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -270,7 +271,7 @@ export function MusicPlayer() {
|
||||
)}
|
||||
</div>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{formatTime(track.duration)}
|
||||
{formatDuration(track.duration)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
@@ -328,8 +329,8 @@ export function MusicPlayer() {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex justify-between text-sm text-muted-foreground">
|
||||
<span>{formatTime(currentTime)}</span>
|
||||
<span>{formatTime(duration)}</span>
|
||||
<span>{formatDuration(currentTime)}</span>
|
||||
<span>{formatDuration(duration)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -408,7 +409,7 @@ export function MusicPlayer() {
|
||||
)}
|
||||
</div>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{formatTime(track.duration)}
|
||||
{formatDuration(track.duration)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user