Add temporary display for listing books

This commit is contained in:
Amy 2021-11-27 23:19:19 -05:00
parent 324ba1efde
commit ef96244b8e
1 changed files with 11 additions and 2 deletions

View File

@ -3,8 +3,17 @@ import React from "react";
import { getAllBooks, SimpleBook } from "../lib/books";
export default function Home(props: Props) {
console.log(props.books);
return <main>I am a book</main>;
return (
<ol>
{props.books.map((book, idx) => {
return (
<li key={`${idx}_${book.isbn}`}>
{book.title}; {book.authors}; {book.isbn}
</li>
);
})}
</ol>
);
}
interface Props {