const { useState } = React; import Swal from 'sweetalert2' import withReactContent from 'sweetalert2-react-content' import { FaStar, FaGoodreads } from "react-icons/fa"; import { GenreTag } from './GenreTag'; import Heart from '@react-sandbox/heart' const showDesc = (title, message) => { withReactContent( Swal.fire({ title: title, text: message, icon: "info", width: '40rem', grow: "fullscreen" }) ) } export default function BookCard({ title, author_name, avg_rating, genres, description, imageUrl, url, model }) { const [active, setActive] = useState(false) return (
{title}
{genres.map((genre) => ( ))}

{title}

{author_name}

{avg_rating}
{ Shiny.setInputValue("app-recommend_books-myval", { title: title, model: model, genres: genres }) console.log() setActive(!active)} } />
); }