mirror of
https://lavaforge.org/spotizerr/spotizerr.git
synced 2025-12-24 02:39:14 -05:00
Fixed typescript linter errors
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useContext, useState, useRef, useEffect } from "react";
|
||||
import { useContext, useState, useRef } from "react";
|
||||
import {
|
||||
FaTimes,
|
||||
FaSync,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user