import React from 'react'
import DefaultLayout from '@/layouts/DefaultLayout/DefaultLayout'
import { getStaticEntryPaths, getStaticEntryProps } from '@/lib/content'
import Book from '@/components/Book/Book'

export const getStaticPaths = () => getStaticEntryPaths('./content/books')
export const getStaticProps = (ctx) => getStaticEntryProps('./content/books', ctx)

export default function LibrarySingle ({ attributes, html }) {
  return (
    <DefaultLayout>
      <Book attributes={attributes} html={html} />
    </DefaultLayout>
  )
}