import { useState } from 'react';
import { BooksContext } from './BooksContext';
import type { Book } from './Book';

const BooksProvider: React.FC<{ children: React.ReactNode }> = ({
  children,
}) => {
  const booksState = useState<Book[]>([]);

  return <BooksContext value={booksState}>{children}</BooksContext>;
};

export default BooksProvider;
