1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-25 22:44:19 +00:00
pds-2021-g2-nest/nest_frontend/components/interactive/BoxAlerts.js

15 lines
523 B
JavaScript

import React from "react"
import BoxFullScrollable from "../base/BoxFullScrollable"
import SummaryAlert from "./SummaryAlert"
import useStrings from "../../hooks/useStrings"
export default function BoxAlerts({ alerts, destroy, running, ...props }) {
const strings = useStrings()
return (
<BoxFullScrollable header={strings.alertTitle} {...props}>
{alerts.map(alert => <SummaryAlert alert={alert} destroy={() => destroy(alert["id"])} running={running}/>)}
</BoxFullScrollable>
)
}