diff --git a/src/components/BooksGrid/BookCard.tsx b/src/components/BooksGrid/BookCard.tsx index 74202eaac..8a17b19c7 100644 --- a/src/components/BooksGrid/BookCard.tsx +++ b/src/components/BooksGrid/BookCard.tsx @@ -2,8 +2,13 @@ import React from 'react'; import { Badge, Card } from 'antd'; import { BookOutlined } from '@ant-design/icons'; import { getColorByName } from '@config'; +import { Book } from '@types'; -const BookCard = ({ data }) => { +interface Props { + data: Book; +} + +const BookCard = ({ data }: Props): JSX.Element => { const { title, url, author, description } = data; return ( diff --git a/src/components/BooksGrid/BooksGrid.tsx b/src/components/BooksGrid/BooksGrid.tsx index 644f514a2..645e225e3 100644 --- a/src/components/BooksGrid/BooksGrid.tsx +++ b/src/components/BooksGrid/BooksGrid.tsx @@ -3,7 +3,7 @@ import { Row, Col } from 'antd'; import { useSiteMetadata } from '@hooks'; import BookCard from './BookCard'; -const BooksGrid = () => { +const BooksGrid = (): JSX.Element => { const { bookList } = useSiteMetadata(); return (