import React from "react"; import { getAllBooks, SimpleBook } from "../lib/books"; export default function Home(props: Props) { return (
    {props.books.map((book, idx) => { return (
  1. {book.title}; {book.authors}; {book.isbn}
  2. ); })}
); } interface Props { books: SimpleBook[]; } export async function getServerSideProps() { return { props: { books: await getAllBooks(), }, }; }