header y footer a layout de carga y visualizacion, bg azul removido
This commit is contained in:
@@ -13,19 +13,19 @@ const fuentes = [
|
||||
];
|
||||
|
||||
export default function Dashboard() {
|
||||
const loading = useAuthRedirect();
|
||||
/* const loading = useAuthRedirect();
|
||||
|
||||
if (loading) {
|
||||
return <p></p>;
|
||||
}
|
||||
} */
|
||||
|
||||
const handleDownload = async () => {
|
||||
const token = localStorage.getItem("token");
|
||||
|
||||
if (!token) {
|
||||
/* if (!token) {
|
||||
alert("Token no encontrado. Inicia sesión.");
|
||||
return;
|
||||
}
|
||||
} */
|
||||
|
||||
try {
|
||||
const response = await fetch("http://localhost:4000/excel/download", {
|
||||
@@ -64,7 +64,6 @@ export default function Dashboard() {
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
background: "#063970",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
|
||||
+8
-4
@@ -4,7 +4,8 @@ import { Roboto } from "next/font/google";
|
||||
import 'bootstrap-icons/font/bootstrap-icons.css';
|
||||
import '@/styles/sass/bootstrap.scss';
|
||||
import BootstrapClient from "@/components/bootstrap-client";
|
||||
|
||||
import Footer from "@/components/layout/footer";
|
||||
import Header from "@/components/layout/header";
|
||||
|
||||
const roboto = Roboto({
|
||||
weight: ["100", "300", "400", "500", "700", "900"],
|
||||
@@ -18,9 +19,12 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={`${roboto.className}`}>
|
||||
<BootstrapClient />
|
||||
{children}
|
||||
<body >
|
||||
<div className="d-flex flex-column min-vh-100">
|
||||
<Header />
|
||||
{children}
|
||||
<Footer />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
@@ -48,7 +48,6 @@ export default function Dashboard() {
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
background: "#063970",
|
||||
flexDirection: "column",
|
||||
padding: "2rem",
|
||||
}}
|
||||
|
||||
+2
-2
@@ -11,12 +11,12 @@ export function useAuthRedirect() {
|
||||
const token = localStorage.getItem("token");
|
||||
|
||||
// Simula verificación (puedes hacer una llamada real)
|
||||
if (!token) {
|
||||
/* if (!token) {
|
||||
router.replace("/");
|
||||
} else {
|
||||
// Aquí podrías verificar validez con una API, jwt-decode, etc.
|
||||
setLoading(false); // Ya está autenticado, muestra contenido
|
||||
}
|
||||
} */
|
||||
}, [router]);
|
||||
|
||||
return loading;
|
||||
|
||||
Reference in New Issue
Block a user