2025-02-15 15:22:07 -08:00
|
|
|
import React from "react";
|
|
|
|
|
import SongRow from "./SongRow";
|
2025-02-15 14:56:58 -08:00
|
|
|
|
2025-02-15 15:22:07 -08:00
|
|
|
interface SongTableProps {
|
|
|
|
|
songs: string[];
|
|
|
|
|
onDelete: (index: number) => void;
|
|
|
|
|
onSkipTo: (index: number) => void;
|
|
|
|
|
}
|
2025-02-15 14:56:58 -08:00
|
|
|
|
2025-02-15 15:22:07 -08:00
|
|
|
const SongTable: React.FC<SongTableProps> = ({ songs, onDelete, onSkipTo }) => {
|
2025-02-15 14:56:58 -08:00
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col w-full h-full overflow-y-auto border-y">
|
|
|
|
|
{songs.map((song, index) => (
|
2025-02-15 15:22:07 -08:00
|
|
|
<SongRow
|
|
|
|
|
key={index}
|
|
|
|
|
song={song}
|
|
|
|
|
onDelete={() => onDelete(index)}
|
|
|
|
|
onPlay={() => onSkipTo(index)}
|
|
|
|
|
/>
|
2025-02-15 14:56:58 -08:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default SongTable;
|