kopia lustrzana https://github.com/Stopka/fedisearch
28 wiersze
673 B
TypeScript
28 wiersze
673 B
TypeScript
import React, { ReactElement } from 'react'
|
|
import { ListNodesItemFragment } from '../../graphql/generated/types'
|
|
import NodeResult from './NodeResult'
|
|
|
|
export default function NodeResults ({ nodes }: {
|
|
nodes: ListNodesItemFragment[] | undefined
|
|
}): ReactElement {
|
|
if (nodes === undefined) {
|
|
return <></>
|
|
}
|
|
|
|
return (
|
|
<tbody>
|
|
{(nodes.length > 0)
|
|
? nodes.map((node, index) => {
|
|
return (
|
|
<NodeResult node={node} key={index}/>
|
|
)
|
|
})
|
|
: (
|
|
<tr>
|
|
<td colSpan={9}>No servers found</td>
|
|
</tr>
|
|
)}
|
|
</tbody>
|
|
)
|
|
}
|