2025-09-03 20:41:25 -04:00
|
|
|
interface InformationProps {
|
|
|
|
|
[key: string]: string | number | undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function Information(props: InformationProps) {
|
2025-10-08 12:01:52 -06:00
|
|
|
const entries = Object.entries(props).filter(
|
|
|
|
|
([_, value]) => value !== undefined
|
|
|
|
|
);
|
2025-09-03 20:41:25 -04:00
|
|
|
|
2025-10-08 12:01:52 -06:00
|
|
|
if (entries.length === 0) return null;
|
2025-09-03 20:41:25 -04:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="information">
|
2025-10-08 12:01:52 -06:00
|
|
|
<ul className="informationList">
|
2025-09-03 20:41:25 -04:00
|
|
|
{entries.map(([key, value]) => (
|
2025-10-08 12:01:52 -06:00
|
|
|
<li key={key} className="informationItem">
|
|
|
|
|
<span className="informationKey">{key}</span>
|
|
|
|
|
<span className="informationValue">{value}</span>
|
2025-09-03 20:41:25 -04:00
|
|
|
</li>
|
|
|
|
|
))}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2025-10-08 12:01:52 -06:00
|
|
|
}
|
|
|
|
|
//IO
|