Get All Books API #13

Merged
a258wang merged 10 commits from feat/api-all-books into main 2022-02-23 00:17:03 -05:00
1 changed files with 11 additions and 2 deletions
Showing only changes of commit ef96244b8e - Show all commits

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 {