diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index cb1d404..1ca2f1f 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -35,10 +35,13 @@ export default function App() { if (hostname.includes("repairit.cloud")) { const token = localStorage.getItem("repairit_token"); - // Si está en el dashboard pero no en app.repairit.cloud, redirigir a app.repairit.cloud/dashboard + if (hostname !== "app.repairit.cloud" && pathname === "/login") { + window.location.href = "https://app.repairit.cloud/login"; + return; + } if (hostname !== "app.repairit.cloud" && pathname.startsWith("/dashboard")) { if (!token) { - window.location.href = "https://repairit.cloud/login"; + window.location.href = "https://app.repairit.cloud/login"; return; } window.location.href = `https://app.repairit.cloud${pathname}`; @@ -46,7 +49,7 @@ export default function App() { } if (hostname === "app.repairit.cloud" && pathname === "/") { if (!token) { - window.location.href = "https://repairit.cloud/login"; + window.location.href = "https://app.repairit.cloud/login"; return; } window.location.href = "/dashboard"; diff --git a/frontend/src/components/layout/PublicLayout.jsx b/frontend/src/components/layout/PublicLayout.jsx index 5a87c0d..dd9d52b 100644 --- a/frontend/src/components/layout/PublicLayout.jsx +++ b/frontend/src/components/layout/PublicLayout.jsx @@ -54,7 +54,7 @@ export default function PublicLayout() {