1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-28 14:16:41 +07:00
This commit is contained in:
Fedor Katurov 2021-03-22 15:56:35 +07:00
parent 9745b895f1
commit 11fd582453
23 changed files with 328 additions and 101 deletions

View file

@ -0,0 +1,34 @@
import React, { FC } from 'react';
import { INode } from '~/redux/types';
import styles from '~/containers/lab/LabStats/styles.module.scss';
import { LabHero } from '~/components/lab/LabHero';
import { Group } from '~/components/containers/Group';
interface IProps {
nodes: Partial<INode>[];
isLoading: boolean;
}
const empty = [...new Array(5)].map((_, i) => i);
const LabHeroes: FC<IProps> = ({ nodes, isLoading }) => {
if (isLoading) {
return (
<Group className={styles.heroes}>
{empty.map(i => (
<LabHero isLoading key={i} />
))}
</Group>
);
}
return (
<Group className={styles.heroes}>
{nodes.slice(0, 7).map(node => (
<LabHero node={node} key={node?.id} />
))}
</Group>
);
};
export { LabHeroes };