17 lines
332 B
JavaScript
17 lines
332 B
JavaScript
import React from "react"
|
|
import SweetAlert from "react-bootstrap-sweetalert";
|
|
|
|
export default function Alert(props) {
|
|
if (!props.alerts.get("show")) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<SweetAlert
|
|
type={props.alerts.get("type")}
|
|
title={props.alerts.get("message")}
|
|
onConfirm={props.dismissAlert}
|
|
/>
|
|
)
|
|
}
|