new structure
This commit is contained in:
+1
-1
@@ -13,6 +13,6 @@ export function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ["/AgregarEquipo"],
|
||||
matcher: ["/AgregarEquipo", "Escaner"],
|
||||
};
|
||||
//IO
|
||||
|
||||
@@ -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({
|
||||
@@ -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({
|
||||
@@ -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 (
|
||||
<div className="dashboardContainer">
|
||||
|
||||
{/* VISTA DE ESCANEO */}
|
||||
<main className="scanView">
|
||||
<h3>Escanear Inventario</h3>
|
||||
@@ -83,4 +85,4 @@ export default function Dashboard() {
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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 (
|
||||
<header className={header.header}>
|
||||
<Link
|
||||
@@ -34,9 +37,8 @@ function Header() {
|
||||
maxHeight: "50%",
|
||||
alignItems: "end",
|
||||
}}
|
||||
className=""
|
||||
>
|
||||
<BarNavigation />
|
||||
{pathname !== "/" && <BarNavigation />}
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user