Rev 6512 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
import { useSelector } from 'react-redux'
import styled from 'styled-components'
import AlertComponent from './AlertComponent'
const NotificationDiv = styled.div`
position: fixed;
top: 1rem;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1200;
`
const NotificationAlert = () => {
const notifications = useSelector(
({ notification }) => notification.notifications
)
return (
<NotificationDiv>
{notifications.map((notification) => (
<AlertComponent notification={notification} key={notification.id} />
))}
</NotificationDiv>
)
}
export default NotificationAlert