import { createBook } from '@/books/book.actions';
import SubmitButton from '@/books/SubmitButton';
import { NextPage } from 'next';

const CreateBookPage: NextPage = () => {
  return (
    <main>
      <h1>Neues Buch anlegen</h1>

      <form action={createBook}>
        <div>
          <label>
            Titel
            <input name="title" required />
          </label>
        </div>

        <div>
          <label>
            Autor
            <input name="author" required />
          </label>
        </div>

        <div>
          <label>
            ISBN
            <input name="isbn" required />
          </label>
        </div>

        <SubmitButton />
      </form>
    </main>
  );
};

export default CreateBookPage;
