Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2008 | Rev 3692 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
5 stevensc 1
import React from 'react'
2
import { useSelector } from 'react-redux'
2173 stevensc 3
import { styled } from '@mui/material'
4
 
5 stevensc 5
import AlertComponent from './AlertComponent'
6
 
2173 stevensc 7
const NotificationDiv = styled('div')`
5 stevensc 8
  position: fixed;
9
  top: 1rem;
10
  left: 50%;
11
  transform: translateX(-50%);
12
  display: flex;
13
  flex-direction: column;
14
  justify-content: center;
15
  align-items: center;
2008 stevensc 16
  z-index: 2200;
5 stevensc 17
`
18
const NotificationAlert = () => {
19
  const notifications = useSelector(
20
    ({ notification }) => notification.notifications
21
  )
22
 
23
  return (
24
    <NotificationDiv>
25
      {notifications.map((notification) => (
26
        <AlertComponent notification={notification} key={notification.id} />
27
      ))}
28
    </NotificationDiv>
29
  )
30
}
31
 
32
export default NotificationAlert