Newer
Older
taehui / qwilight-fe / src / app / [language] / etc / components / FavoritesView.tsx
@Taehui Taehui on 17 Mar 744 bytes 2024-03-17 오후 2:12
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>
  );
}