import Link from "next/link"; import type { SongRow } from "@/lib/db/client"; interface SongResultProps { song: SongRow; } function formatDuration(seconds: number | null): string { if (!seconds) return ""; const m = Math.floor(seconds / 60); const s = Math.round(seconds % 60); return `${m}:${String(s).padStart(2, "0")}`; } export default function SongResult({ song }: SongResultProps) { const duration = formatDuration(song.duration_seconds); return (
{song.title}
{song.artist}