Merge branch 'Lino' of https://github.com/jls846/front-censo into Sarabia

This commit is contained in:
jls846
2025-11-01 19:34:33 -06:00
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -8,6 +8,8 @@ import { usePathname } from "next/navigation";
function Header() {
const pathname = usePathname();
const rutasConBar = ["/escaner", "/AgregarEquipo"];
return (
<header className={header.header}>
<Link
@@ -38,7 +40,7 @@ function Header() {
alignItems: "end",
}}
>
{pathname !== "/" && <BarNavigation />}
{rutasConBar.includes(pathname) && <BarNavigation />}
</div>
</header>
);
+1 -1
View File
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
export function middleware(request: NextRequest) {
const token = request.cookies.get("token");
const token = request.cookies.get("token")?.value;
if (!token) {
console.log("No hay token, redirigiendo a la página de inicio de sesión");