diff --git a/karaokatalog/ui/static/components/pieces/Artist.js b/karaokatalog/ui/static/components/pieces/Artist.js new file mode 100644 index 0000000..1f523ad --- /dev/null +++ b/karaokatalog/ui/static/components/pieces/Artist.js @@ -0,0 +1,14 @@ +import Song from "./Song.js" + +export default { + view: function (vnode) { + const { artist, songs } = vnode.attrs + return m( + "section.artist", + [ + m("h2", artist), + songs.map(song => m(Song, { song })), + ], + ) + }, +}