import Link from "next/link"; import NoteField from "@/components/NoteField"; import type { Song } from "@/lib/browse"; import { projectHref } from "@/lib/hrefs"; import type { NoteMap } from "@/lib/notes"; import { SONG_PIECE_TABS, songTabOfNote } from "@/lib/pieces/song-tabs.mjs"; // The Notes tab: the note on the song as a whole -- the one obvious place to // write about it, SongProject's head row, moved unchanged (P4a-3) -- and, under // it, every other note on the song, each linking the tab it is written on (a // cut's, a file's or a mark's on Cuts, a plan's on Spec, a cover's on Cover). const TAB_LABEL = Object.fromEntries(SONG_PIECE_TABS.map((t) => [t.id, t.label])); export default function NotesTab({ projectId, song, notes }: { projectId: string; song: Song; notes: NoteMap }) { const others = Object.entries(notes) .filter(([target, n]) => target !== "song" && n && typeof n.note === "string" && n.note.trim()) .sort(([a], [b]) => a.localeCompare(b)); return (
None yet. Notes on a cut, a file, a plan or a cover show here.
) : (