diff --git a/packages/frontend/public/404.html b/packages/frontend/public/404.html new file mode 100644 index 0000000..072a57e --- /dev/null +++ b/packages/frontend/public/404.html @@ -0,0 +1,13 @@ + + + + + + + frontend + + +
+ + + diff --git a/packages/frontend/src/app/router.tsx b/packages/frontend/src/app/router.tsx index 67ba5a4..a1a1866 100644 --- a/packages/frontend/src/app/router.tsx +++ b/packages/frontend/src/app/router.tsx @@ -1,12 +1,13 @@ import { createBrowserRouter, Navigate } from "react-router-dom"; import LoginPage from "../pages/auth/LoginPage"; -import RegisterPage from "../pages/auth/RegisterPage"; // 👈 Importación corregida +import RegisterPage from "../pages/auth/RegisterPage"; import DashboardApp from "../pages/dashboard/DashboardPage"; +// 1. Corregimos la navegación para que use rutas relativas const genericNavigate = (page: string) => { - if (page === 'login') window.location.href = '/login'; - if (page === 'register') window.location.href = '/register'; - if (page === 'dashboard') window.location.href = '/dashboard'; + if (page === 'login') window.location.href = './login'; + if (page === 'register') window.location.href = './register'; + if (page === 'dashboard') window.location.href = './dashboard'; }; export const router = createBrowserRouter([ @@ -16,11 +17,14 @@ export const router = createBrowserRouter([ element: , }, { - path: "/register", // 👈 Esta es la ruta para tu nuevo código + path: "/register", element: , }, { path: "/dashboard", element: , }, -]); \ No newline at end of file +], { + // 2. AÑADIMOS ESTO PARA GITHUB PAGES + basename: "/Web3", +}); \ No newline at end of file