aah/client/App.tsx

37 lines
939 B
TypeScript
Raw Normal View History

2023-08-07 07:43:50 +00:00
import { StrictMode } from "react";
2023-08-07 23:36:33 +00:00
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 },
],
},
]);
2023-08-07 07:43:50 +00:00
export default function App() {
2023-08-07 23:36:33 +00:00
return (
<StrictMode>
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
</StrictMode>
);
2023-08-07 07:43:50 +00:00
}