initial commit
This commit is contained in:
19
src/components/NodeList.js
Normal file
19
src/components/NodeList.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import NodeCard from './NodeCard';
|
||||
|
||||
/**
|
||||
* @param {{ nodes: Array<{ name: string; type: string; cpu: number; memory: { total: number; used: number }; status: string; uptime: number; load: number }> }} props
|
||||
* @returns {import('react').ReactNode}
|
||||
*/
|
||||
export default function NodeList({ nodes }) {
|
||||
if (!nodes?.length) {
|
||||
return <p className="text-text-secondary text-sm">No nodes found.</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{nodes.map((node) => (
|
||||
<NodeCard key={node.name} node={node} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user