import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App";
import { AdminApp } from "./pages/admin/AdminApp";

const isAdmin = window.location.pathname.startsWith("/admin");

if (isAdmin) {
  document.title = "Admin - TV Dashboard";
}

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    {isAdmin ? <AdminApp /> : <App />}
  </StrictMode>
);
