add types

This commit is contained in:
IO420
2025-10-02 01:41:41 -06:00
parent d65efc56ab
commit 08401ce82a
4 changed files with 14 additions and 6 deletions
@@ -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 (
<div className="information">
@@ -21,5 +18,5 @@ export default function Information(props: InformationProps) {
</ul>
</div>
);
}
}
//IO
@@ -56,3 +56,4 @@ function SearchUser(props: urlProp) {
}
export default SearchUser;
//IO