index.tsx 616 B

123456789101112131415161718192021222324252627
  1. import Link from "next/link";
  2. import NovelCover from "../NovelCover";
  3. interface NovelItemProps {
  4. slug?: string;
  5. img?: string;
  6. name?: string;
  7. }
  8. export default function NovelItem(props: NovelItemProps) {
  9. const { slug, img, name } = props;
  10. const href = `/novel/${slug}`;
  11. return (
  12. <li className="novel-item">
  13. <NovelCover href={href} alt={name} src={img} />
  14. <h3 className="novel-item-title">
  15. <Link href={href} title={name}>
  16. {name}
  17. </Link>
  18. </h3>
  19. {/* <p className="novel-item-desc">
  20. <a href="">Fantasy Romance</a>
  21. </p> */}
  22. </li>
  23. );
  24. }