import { ApolloProvider } from '@apollo/client/react';
import List from './List';
import './App.css';
import { Suspense } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { apolloClient } from './apolloClient';
import Info from './Info';

function App() {
  return (
    <ApolloProvider client={apolloClient}>
      <Suspense fallback={<div>Lade Bücher...</div>}>
        <ErrorBoundary fallback={<div>Es ist ein Fehler aufgetreten</div>}>
          <Info />
          <List />
        </ErrorBoundary>
      </Suspense>
    </ApolloProvider>
  );
}

export default App;

