diff --git a/app/(private)/Impresiones/page.tsx b/app/(private)/Impresiones/page.tsx index 53494b1..ca95c16 100644 --- a/app/(private)/Impresiones/page.tsx +++ b/app/(private)/Impresiones/page.tsx @@ -28,7 +28,7 @@ export default async function Page(props: { if (result.error) { errorMessage = `${result.error}`; } else { - student = result; + student = result as Student; } } diff --git a/app/Components/Global/Information/information.tsx b/app/Components/Global/Information/information.tsx index 3b1db2c..60c23c8 100644 --- a/app/Components/Global/Information/information.tsx +++ b/app/Components/Global/Information/information.tsx @@ -1,14 +1,11 @@ -'use client'; - interface InformationProps { [key: string]: string | number | undefined; } export default function Information(props: InformationProps) { - // Obtenemos las entradas (key + value) y filtramos los que sean undefined const entries = Object.entries(props).filter(([_, value]) => value !== undefined); - if (entries.length === 0) return null; // no mostrar nada si no hay datos + if (entries.length === 0) return null; return (
@@ -21,5 +18,5 @@ export default function Information(props: InformationProps) {
); -} +} //IO \ No newline at end of file diff --git a/app/Components/Global/SearchUser/searchUser.tsx b/app/Components/Global/SearchUser/searchUser.tsx index 9251b8e..3dc6881 100644 --- a/app/Components/Global/SearchUser/searchUser.tsx +++ b/app/Components/Global/SearchUser/searchUser.tsx @@ -56,3 +56,4 @@ function SearchUser(props: urlProp) { } export default SearchUser; +//IO \ No newline at end of file diff --git a/app/types/student.ts b/app/types/student.ts new file mode 100644 index 0000000..9a5d9de --- /dev/null +++ b/app/types/student.ts @@ -0,0 +1,10 @@ +interface Carrera { + carrera: string; +} + +interface Student { + id_cuenta: number; + nombre: string; + carrera: Carrera; + credito: number; +} \ No newline at end of file