import * as React from 'react';
import { createRoot } from 'react-dom/client';
import { createBrowserRouter, RouterProvider, Link } from 'react-router-dom';
import './index.css';
import Dashboard from './pages/index';

import { QueryClient, QueryClientProvider } from 'react-query';

const router = createBrowserRouter([
  {
    path: '/*',
    element: <Dashboard />,
  },
]);

export const queryClient = new QueryClient();

function render() {
  createRoot(document.getElementById('app')!).render(
    <QueryClientProvider client={queryClient}>
      <RouterProvider router={router} />
    </QueryClientProvider>
  );
}

render();
