From 6044e7c37558ca056c72568b6b000934cc4f46f4 Mon Sep 17 00:00:00 2001 From: dm1sh Date: Fri, 16 Jul 2021 04:39:12 +0500 Subject: [PATCH] Fixed books without cover display and added links to book page --- .../Bookshelf/BookItem/BookItem.module.css | 2 ++ src/pages/Bookshelf/BookItem/index.tsx | 33 +++++++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/pages/Bookshelf/BookItem/BookItem.module.css b/src/pages/Bookshelf/BookItem/BookItem.module.css index d98dbaf..ed518ea 100644 --- a/src/pages/Bookshelf/BookItem/BookItem.module.css +++ b/src/pages/Bookshelf/BookItem/BookItem.module.css @@ -1,4 +1,6 @@ .bookCard { + text-decoration: none; + color: black; width: 300px; border: 1px lightgrey solid; overflow: hidden; diff --git a/src/pages/Bookshelf/BookItem/index.tsx b/src/pages/Bookshelf/BookItem/index.tsx index e20c688..f2cb3c4 100644 --- a/src/pages/Bookshelf/BookItem/index.tsx +++ b/src/pages/Bookshelf/BookItem/index.tsx @@ -3,23 +3,28 @@ import React from "react"; import styles from "./BookItem.module.css"; import { IBook } from "~/types/book"; +import { Link } from "wouter"; interface IBookItemProps extends IBook {} -export const BookItem = ({ author, title, cover }: IBookItemProps) => { +export const BookItem = ({ author, title, cover, hash }: IBookItemProps) => { return ( -
-
-

{title}

-

{author}

-
-
- {title -
-
+ + +
+

{title}

+

{author}

+
+ {cover && ( +
+ {title +
+ )} +
+ ); };