//import './index.css';

import React from 'react';
import ReactDOM from 'react-dom/client';
import reportWebVitals from './reportWebVitals';
import ClientContextProvider from './contexts/clientProvider';
import config from './infinitymint.client.config';
import { createBrowserRouter } from 'react-router-dom';

//create the router
const router = createBrowserRouter(config.sitemap, {
    future: {
        // Normalize `useNavigation()`/`useFetcher()` `formMethod` to uppercase
        v7_normalizeFormMethod: true,
    },
});

// Start infinitymint
(async () => {
    ReactDOM.createRoot(document.querySelector('#root')!).render(
        <ClientContextProvider config={config}>
            <h1>Hello World!</h1>
        </ClientContextProvider>
    );
})();

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals(console.table);
