import { StrictMode } from "react";
import { RouterProvider } from "react-router";
import { createBrowserRouter } from "react-router-dom";

import "normalize.css";
import "@blueprintjs/core/lib/css/blueprint.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";

import Home from "./pages/Home";
import Service from "./pages/Service";
import Root from "./Root";
import { QueryClient, QueryClientProvider } from "react-query";

const queryClient = new QueryClient();

const router = createBrowserRouter([
  {
    path: "/",
    Component: Root,
    children: [
      { path: "/", Component: Home },
      { path: "/service/:id", Component: Service },
    ],
  },
]);

export default function App() {
  return (
    <StrictMode>
      <QueryClientProvider client={queryClient}>
        <RouterProvider router={router} />
      </QueryClientProvider>
    </StrictMode>
  );
}
