Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2173 | Rev 3693 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2173 Rev 3692
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react';
2
import { useSelector } from 'react-redux'
2
import { useSelector } from 'react-redux';
3
import { styled } from '@mui/material'
3
import { styled } from '@mui/material';
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
import AlertComponent from './AlertComponent'
5
import AlertComponent from './AlertComponent';
6
 
6
 
7
const NotificationDiv = styled('div')`
7
const NotificationDiv = styled('div')`
8
  position: fixed;
8
  position: fixed;
Línea 12... Línea 12...
12
  display: flex;
12
  display: flex;
13
  flex-direction: column;
13
  flex-direction: column;
14
  justify-content: center;
14
  justify-content: center;
15
  align-items: center;
15
  align-items: center;
16
  z-index: 2200;
16
  z-index: 2200;
17
`
17
`;
18
const NotificationAlert = () => {
18
const NotificationAlert = () => {
19
  const notifications = useSelector(
-
 
20
    ({ notification }) => notification.notifications
19
  const notifications = useSelector(({ notification }) => notification.notifications);
21
  )
-
 
Línea 22... Línea 20...
22
 
20
 
23
  return (
21
  return (
-
 
22
    <NotificationDiv>
-
 
23
      <AlertComponent
-
 
24
        notification={{
-
 
25
          id: '1',
-
 
26
          style: 'success',
-
 
27
          msg: 'Teste de notificação'
-
 
28
        }}
-
 
29
      />
-
 
30
      <AlertComponent
-
 
31
        notification={{
-
 
32
          id: '1',
-
 
33
          style: 'danger',
-
 
34
          msg: 'Teste de notificação'
-
 
35
        }}
24
    <NotificationDiv>
36
      />
25
      {notifications.map((notification) => (
37
      {notifications.map((notification) => (
26
        <AlertComponent notification={notification} key={notification.id} />
38
        <AlertComponent notification={notification} key={notification.id} />
27
      ))}
39
      ))}
28
    </NotificationDiv>
40
    </NotificationDiv>
29
  )
41
  );
Línea 30... Línea 42...
30
}
42
};