From 76ff60304ab39d9e6efee24ec143eef0707e1344 Mon Sep 17 00:00:00 2001 From: evenegas Date: Mon, 18 Aug 2025 10:43:47 -0600 Subject: [PATCH] Se agregaron condiciones de texto --- src/app/carga/page.tsx | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/app/carga/page.tsx b/src/app/carga/page.tsx index 7075f01..ccfa115 100644 --- a/src/app/carga/page.tsx +++ b/src/app/carga/page.tsx @@ -6,6 +6,7 @@ import CargaArchivo from "@/components/cargaArchivo"; import Button from "@/components/button"; import { useAuthRedirect } from "@/hooks/auth"; import { getUserFromToken } from "@/components/Hook"; +import { useSession } from "@/hooks/use-session"; const apiUrl = process.env.NEXT_PUBLIC_API_URL; @@ -21,6 +22,8 @@ export default function Dashboard() { const loading = useAuthRedirect(); const [fuentes, setFuentes] = useState([]); const [descargando, setDescargando] = useState(false); + const { data: user, } = useSession() + const fetchMovimientos = async () => { const token = localStorage.getItem("token"); @@ -56,6 +59,9 @@ export default function Dashboard() { fetchMovimientos(); }, []); + + + const handleDownload = async () => { const token = localStorage.getItem("token"); if (!token) { @@ -112,7 +118,8 @@ export default function Dashboard() { return (
-
+ + {user?.tipo !== "LOAD" ?

Descargar: obtiene todos los usuarios que se han ingresado de las distintas fuentes o cargas. @@ -132,17 +139,22 @@ export default function Dashboard() { esa fuente. -

+
: null} + + +

Descarga de Datos

- -
+ {user?.tipo !== "LOAD" ?
Paso 1. Descarga el archivo. -
+ : null} + + +