Fixed typescript linter errors

This commit is contained in:
Xoconoch
2025-08-01 20:48:05 -06:00
parent 6b7a7f4f8d
commit 8aad9faea9
3 changed files with 2 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { useContext, useState, useRef, useEffect } from "react";
import { useContext, useState, useRef } from "react";
import {
FaTimes,
FaSync,

View File

@@ -78,12 +78,7 @@ const formatQuality = (entry: HistoryEntry): string => {
return bitrate ? `${format} ${bitrate}` : format;
};
const formatFileSize = (bytes?: number): string => {
if (!bytes) return "N/A";
const sizes = ['B', 'KB', 'MB', 'GB'];
const i = Math.floor(Math.log(bytes) / Math.log(1024));
return `${(bytes / Math.pow(1024, i)).toFixed(1)} ${sizes[i]}`;
};
const formatDuration = (ms?: number): string => {
if (!ms) return "N/A";

View File

@@ -6,7 +6,6 @@ import { toast } from "sonner";
import type { TrackType, PlaylistMetadataType, PlaylistTracksResponseType, PlaylistItemType } from "../types/spotify";
import { QueueContext } from "../contexts/queue-context";
import { FaArrowLeft } from "react-icons/fa";
import { FaDownload } from "react-icons/fa6";