You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. import React from "react";
  2. import ReactDOM from "react-dom/client";
  3. import "./index.css";
  4. import { createBrowserRouter, RouterProvider } from "react-router-dom";
  5. import Login from "./pages/login/Login";
  6. import Measure from "./pages/measure/Measure";
  7. import MeasureConfig from "./pages/measure/components/MeasureConfig";
  8. import MeasureDetail from "./pages/measure/components/MeasureDetail";
  9. import MeasureAction from "./pages/measure/components/MeasureAction";
  10. import App from "./App";
  11. import reportWebVitals from "./reportWebVitals";
  12. const router = createBrowserRouter([
  13. {
  14. path: "/",
  15. element: <App />,
  16. children: [
  17. {
  18. path: "measure",
  19. element: <Measure />,
  20. children: [
  21. {
  22. path: "config",
  23. element: <MeasureConfig />,
  24. },
  25. {
  26. path: "detail",
  27. element: <MeasureDetail />,
  28. },
  29. {
  30. path: "action",
  31. element: <MeasureAction />,
  32. },
  33. ],
  34. },
  35. ],
  36. },
  37. {
  38. path: "/login",
  39. element: <Login />,
  40. },
  41. ]);
  42. const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement);
  43. root.render(
  44. <React.StrictMode>
  45. <RouterProvider router={router} />
  46. </React.StrictMode>
  47. );
  48. console.log(process.env.REACT_APP_WS_URL);
  49. // If you want to start measuring performance in your app, pass a function
  50. // to log results (for example: reportWebVitals(console.log))
  51. // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
  52. reportWebVitals();