import { BrowserRouter } from "react-router-dom";
import { RecoilRoot } from "recoil";
import { ApolloProvider } from "@apollo/client";

import { combineProviders } from "./combine-provider";

const Providers = combineProviders([
	[BrowserRouter, { basename: 'optionalString', forceRefresh: true }],
	[RecoilRoot, { initializeState: (MutableSnapshot => void), override: false }],
	[ApolloProvider, { client } ],
]);

function Root() {
	return (
		<Providers>
			<App />
		</Providers>
	);
}
