import style from './BookListItem.module.css'
import Link from 'next/link'

export default function BookListItem ({ href, title, author, stars, readDate, url, thumbnailUrl, tags, review }) {
  return (
    <div className={style.item}>
      <Link href={href}>
        <div
          className={style.thumb} style={{
            backgroundImage: `url(${thumbnailUrl ?? '/img/book-placeholder.jpg'})`
          }}
        />
      </Link>
      <div>
        <h2 className={style.heading}>
          <Link href={href}>{title}</Link>
        </h2>
        <p className={style.author}>{author}</p>
        <p>{tags}</p>
        {/* <p>{stars}/5</p> */}
      </div>
    </div>
  )
}
