Newer
Older
taehui / qwilight-fe / src / etc / FavoritesView.tsx
@Taehui Taehui on 20 Nov 710 bytes 2023-11-20 오후 9:36
import { Badge, ListGroup } from "reactstrap";

import NoteItem from "src/note/NoteItem";
import { EtcAPINote } from "src/wwwAPI";

export default function FavoritesView({
  title,
  favorites,
}: {
  title: string;
  favorites: EtcAPINote[];
}) {
  return (
    <ListGroup>
      <Badge>{title}</Badge>
      {favorites.map(
        ({ noteID, artist, title, genre, levelText, level, value }) => (
          <NoteItem
            key={noteID}
            noteID={noteID}
            artist={artist}
            title={title}
            genre={genre}
            levelText={levelText}
            level={level}
            fittedText={`👍 ${value}`}
          />
        ),
      )}
    </ListGroup>
  );
}