Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sterioboy committed Oct 31, 2023
1 parent cc3b8ea commit ffaa5a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/audio-player/audio-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const AudioPlayer = () => {
if (audioId !== undefined) {
setCurrentSongIndex(audioId);
} else if (isActiveShuffle) {
setCurrentSongIndex(index => Math.floor(Math.random() * playlist.length));
setCurrentSongIndex((/* index */) => Math.floor(Math.random() * playlist.length));
} else if (currentSongIndex < playlist.length - 1) {
setCurrentSongIndex(i => i + 1);
}
Expand Down Expand Up @@ -107,7 +107,7 @@ export const AudioPlayer = () => {
);

const handleAddToQueue = useCallback(
audioId => {
(audioId: any) => {
const updatedPlaylist = [...playlist];
const songToMove = updatedPlaylist[audioId];
updatedPlaylist.push(songToMove);
Expand Down
6 changes: 3 additions & 3 deletions src/components/audio-player/components/playlist/playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { twJoin } from 'tailwind-merge';
import PauseIcon from '../../images/pause.svg?react';

export const Playlist = ({
handlePlayNext,
handleAddToQueue,
/* handlePlayNext,
handleAddToQueue, */
currentIdAudio,
onNext,
}: {
Expand All @@ -19,7 +19,7 @@ export const Playlist = ({
return (
<div className="mt-3 h-[140px] overflow-scroll pt-4">
<div className="flex flex-col gap-3">
{playlist.map(({ name, author, audioUrl, id, duration, imageUrl }, index) => (
{playlist.map(({ name, /* author, audioUrl, id, */ duration, imageUrl }, index) => (
<div className="flex cursor-pointer" key={index} onClick={() => onNext(index)}>
<div
className={twJoin(
Expand Down
4 changes: 1 addition & 3 deletions src/components/navbar/components/dropdown-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { useState } from 'react';
import { RiAlignJustify, RiMoonFill, RiSunFill } from 'react-icons/ri';
import { RiAlignJustify } from 'react-icons/ri';
import { Link } from 'react-router-dom';

import Button from 'components/button/button';
import Dropdown from 'components/dropdown/dropdown';

const DropdownMenu = () => {
const [darkmode, setDarkmode] = useState(document.body.classList.contains('dark'));

return (
<Dropdown
Expand Down

0 comments on commit ffaa5a2

Please sign in to comment.