Proyectos de Subversion LeadersLinked - SPA

Rev

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

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