diff --git a/middleware.ts b/middleware.ts index bf54abf..3a86fa0 100644 --- a/middleware.ts +++ b/middleware.ts @@ -13,6 +13,6 @@ export function middleware(request: NextRequest) { } export const config = { - matcher: ["/AgregarEquipo"], + matcher: ["/AgregarEquipo", "Escaner"], }; //IO diff --git a/src/app/AgregarEquipo/page.tsx b/src/app/(Operador)/AgregarEquipo/page.tsx similarity index 99% rename from src/app/AgregarEquipo/page.tsx rename to src/app/(Operador)/AgregarEquipo/page.tsx index 190cd44..df3c474 100644 --- a/src/app/AgregarEquipo/page.tsx +++ b/src/app/(Operador)/AgregarEquipo/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import "../styles/layout/agregarEquipo.scss"; // Asegúrate de crear este archivo +import "../../styles/layout/agregarEquipo.scss"; // Asegúrate de crear este archivo export default function page() { const [formData, setFormData] = useState({ diff --git a/src/app/Editar/editar.css b/src/app/(Operador)/Editar/editar.css similarity index 100% rename from src/app/Editar/editar.css rename to src/app/(Operador)/Editar/editar.css diff --git a/src/app/Editar/page.tsx b/src/app/(Operador)/Editar/page.tsx similarity index 99% rename from src/app/Editar/page.tsx rename to src/app/(Operador)/Editar/page.tsx index 43483dd..dc6f33b 100644 --- a/src/app/Editar/page.tsx +++ b/src/app/(Operador)/Editar/page.tsx @@ -1,6 +1,6 @@ "use client"; import { useState } from "react"; -import "../styles/layout/agregarEquipo.scss"; +import "../../styles/layout/agregarEquipo.scss"; import "./editar.css"; export default function Home() { const [formData, setFormData] = useState({ diff --git a/src/app/Escaner/page.tsx b/src/app/(Operador)/Escaner/page.tsx similarity index 92% rename from src/app/Escaner/page.tsx rename to src/app/(Operador)/Escaner/page.tsx index dcdd707..64b4f5c 100644 --- a/src/app/Escaner/page.tsx +++ b/src/app/(Operador)/Escaner/page.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { useRouter } from "next/navigation"; -import "../styles/layout/escaner.scss"; // Importación global +import "../../styles/layout/escaner.scss"; // Importación global // Tipos type Equipo = { @@ -44,7 +44,10 @@ export default function Dashboard() { } else { const codigo = prompt("Equipo no registrado. Ingresa el codigo:"); if (codigo) { - setEquipos([...equipos, { id: code, nombre: codigo, estado: "Disponible" }]); + setEquipos([ + ...equipos, + { id: code, nombre: codigo, estado: "Disponible" }, + ]); alert("Equipo agregado al inventario"); } } @@ -52,7 +55,6 @@ export default function Dashboard() { return (
- {/* VISTA DE ESCANEO */}

Escanear Inventario

@@ -83,4 +85,4 @@ export default function Dashboard() {
); -} \ No newline at end of file +} diff --git a/src/components/header.tsx b/src/components/header.tsx index 085e669..827c457 100644 --- a/src/components/header.tsx +++ b/src/components/header.tsx @@ -3,8 +3,11 @@ import Image from "next/image"; import header from "../app/styles/layout/header.module.scss"; import Link from "next/link"; import BarNavigation from "./BarNavigation"; +import { usePathname } from "next/navigation"; function Header() { + const pathname = usePathname(); // obtenemos la ruta actual + return (
- + {pathname !== "/" && }
);