// import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import "./index.css";
import "./i18n";
import App from "./App";
// import ErrorBoundary from "./ErrorBoundary";
import HistoryPage from "./HistoryPage";
import ScheduledPage from "./ScheduledPage";
import StreamPage2 from "./pages/StreamPage2";
// import StreamPage from "./StreamPage";

const router = createBrowserRouter([
  {
    path: "/",
    element: <App />,
    // errorElement: <ErrorBoundary />,
  },
  {
    path: "/stream/:id",
    element: <StreamPage2 />,
  },
  {
    path: "/history",
    element: <HistoryPage />,
  },
  {
    path: "/scheduled/:sessionId",
    element: <ScheduledPage />,
  },
]);

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <RouterProvider router={router} />
);
