Renders the card that shows a playlist in profiles, search results, the playlists page and the dump page's "In collections" section.

Functions

f
PlaylistCard(unnamed 0: PlaylistCardProps): React.JSX.Element

Renders a playlist as a card that opens the playlist when clicked, in a new tab on a middle click (useCardLink), with its cover, or a tile of its own colour without one, the playlist categories it is filed under and when it last took a dump. Another user's recent playlist shows an unread dot until it is opened on this device. The card is an <li>, for a <ul>, whose class lays it out: a row in a .dump-feed, a tile in a .playlist-grid.

Interfaces

I
PlaylistCardProps

Passed to PlaylistCard by each list of playlists.

  • grid: boolean

    Set for a tile of the playlists page's grid, whose cover is larger.

  • isOwner: boolean

    Hides the owner link and the unread dot.

  • onDelete: () => void

    Shows a delete button, which calls it. The owner's playlists pages pass one that asks for confirmation first.

  • playlist: Playlist
  • privateBadgeOnly: boolean

    Used by dump pages to display "In collections" lists. Prevents the visibility badge from showing, except to the owner of a private playlist: public badges on every card there would say nothing.