mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-30 00:14:19 +00:00
23 lines
619 B
JavaScript
23 lines
619 B
JavaScript
|
import React from "react"
|
||
|
import Loading from "../base/Loading"
|
||
|
import BoxFullScrollable from "../base/BoxFullScrollable"
|
||
|
import SummaryUser from "./SummaryUser"
|
||
|
|
||
|
|
||
|
export default function BoxUserList({ users, destroyUser, running, ...props }) {
|
||
|
let contents
|
||
|
if(users === null) {
|
||
|
contents = <Loading/>
|
||
|
}
|
||
|
else {
|
||
|
contents = users.map(user =>
|
||
|
<SummaryUser key={user["email"]} destroyUser={destroyUser} running={running} user={user}/>)
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<BoxFullScrollable header={"Elenco utenti"} {...props}>
|
||
|
{contents}
|
||
|
</BoxFullScrollable>
|
||
|
)
|
||
|
}
|