mentorenwahl/docker/frontend/pages/_app.tsx

23 lines
526 B
TypeScript
Raw Normal View History

2022-01-29 15:40:39 +00:00
import type { AppProps } from "next/app";
2022-02-02 14:38:36 +00:00
import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";
2022-01-29 15:40:39 +00:00
2022-02-02 14:38:36 +00:00
import MainLayout from "../layouts/main";
2022-01-29 15:40:39 +00:00
import "../styles/globals.css";
2022-02-02 14:38:36 +00:00
const client = new ApolloClient({
uri: "/graphql",
cache: new InMemoryCache(),
});
function MyApp({ Component, pageProps }: AppProps): JSX.Element {
return (
<ApolloProvider client={client}>
<MainLayout>
<Component {...pageProps} />
</MainLayout>
</ApolloProvider>
);
2022-01-29 15:40:39 +00:00
}
export default MyApp;