From 71296811b587014ba10c1d60c93e0cd9e774e504 Mon Sep 17 00:00:00 2001 From: CarlosssFlores <307100636@pcpuma.acatlan.unam.mx> Date: Wed, 24 Sep 2025 15:46:04 -0600 Subject: [PATCH] new view --- .example.txt | 1 - app/Components/Equipos/equipos.tsx | 101 +++++++++++++++++++++-------- 2 files changed, 73 insertions(+), 29 deletions(-) delete mode 100644 .example.txt diff --git a/.example.txt b/.example.txt deleted file mode 100644 index 4b73e25..0000000 --- a/.example.txt +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_API_URL= \ No newline at end of file diff --git a/app/Components/Equipos/equipos.tsx b/app/Components/Equipos/equipos.tsx index 1b0079f..122a384 100644 --- a/app/Components/Equipos/equipos.tsx +++ b/app/Components/Equipos/equipos.tsx @@ -1,39 +1,84 @@ +"use client"; +import axios from "axios"; +import { envConfig } from "@/app/lib/config"; +import { useState } from "react"; + +interface Data { + nombre_equipo: string; + id_equipo: number; + id_plataforma: number; + id_area_ubicacion: number; +} + export default function Equipos() { + const [Equipo, setEquipo] = useState(""); + const [Data, setData] = useState(); + + const handleSubmit = async () => { + const response = await axios.get( + `${envConfig.apiUrl}/InformacionEquipo/${Equipo}` + ); + + if (!response) { + return; + } + + setData(response); + }; + return (
- - + { + setEquipo(e.target.value); + }} + /> + +
- - - - + {Data && ( +
+ + - - + + - - -
- - -
+ + + + + +
+ + +
+
+ )}
); }