Skip to content

Commit

Permalink
fix(BooksGrid): add missing types
Browse files Browse the repository at this point in the history
issue #82
  • Loading branch information
sabertazimi committed Aug 4, 2021
1 parent 55ac9b5 commit fda78a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/BooksGrid/BookCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/BooksGrid/BooksGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit fda78a6

Please sign in to comment.