mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-11 19:06:51 +00:00
feat: map alerts
This commit is contained in:
parent
b8e43a986b
commit
c6908e902f
@ -9,7 +9,7 @@ type Alert = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const AlertsList = () => {
|
const AlertsList = () => {
|
||||||
const [_, setAlerts] = useState([] as Alert[])
|
const [alerts, setAlerts] = useState([] as Alert[])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setAlerts([
|
setAlerts([
|
||||||
@ -38,24 +38,14 @@ const AlertsList = () => {
|
|||||||
<ChevronRightIcon size={20} />
|
<ChevronRightIcon size={20} />
|
||||||
</div>
|
</div>
|
||||||
</XStack>
|
</XStack>
|
||||||
<InformationBox
|
{alerts.map(alert => (
|
||||||
message="Network: Participation rate below 66%"
|
<InformationBox
|
||||||
icon={<CloseCircleIcon size={20} />}
|
key={alert.message}
|
||||||
variant="default"
|
message={alert.message}
|
||||||
onClosePress={() => alert('dismissed')}
|
icon={<CloseCircleIcon size={20} />}
|
||||||
/>
|
variant={alert.variant}
|
||||||
<InformationBox
|
/>
|
||||||
message="Node: 32 Peers Connected"
|
))}
|
||||||
icon={<CloseCircleIcon size={20} />}
|
|
||||||
variant="information"
|
|
||||||
onClosePress={() => alert('dismissed')}
|
|
||||||
/>
|
|
||||||
<InformationBox
|
|
||||||
message="Node / Validator: Process Down"
|
|
||||||
icon={<CloseCircleIcon size={20} />}
|
|
||||||
variant="error"
|
|
||||||
onClosePress={() => alert('dismissed')}
|
|
||||||
/>
|
|
||||||
</YStack>
|
</YStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user