Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6512 | | Comparar con el anterior | Ultima modificación | Ver Log |

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