Primera versión
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.jsx";
|
||||
import AppMovil from "./AppMovil.jsx";
|
||||
import AdminPanel from "./AdminPanel.jsx";
|
||||
|
||||
// Enrutador mínimo sin dependencias extra
|
||||
const ruta = window.location.pathname.replace(/\/$/, "");
|
||||
|
||||
function Root() {
|
||||
if (ruta === "/admin") return <AdminPanel />;
|
||||
if (ruta === "/movil") return <AppMovil />;
|
||||
return <App />;
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")).render(
|
||||
<StrictMode><Root /></StrictMode>
|
||||
);
|
||||
Reference in New Issue
Block a user