Newer
Older
taehui / qwilight-fe / src / app / [language] / etc / components / FavoritesView.tsx
import NoteItem from "@/app/[language]/note/components/NoteItem";
import { EtcAPINoteFile } from "@/type/wwwAPI";
import { Badge, ListGroup } from "reactstrap";

export default function FavoritesView({
  title,
  favorites,
}: {
  title: string;
  favorites: EtcAPINoteFile[];
}) {
  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>
  );
}