Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 7545 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7545 Rev 14175
Línea 1... Línea 1...
1
import React from "react";
1
import React from 'react'
2
import { connect } from "react-redux";
2
import { connect } from 'react-redux'
3
import styled from "styled-components";
3
import styled from 'styled-components'
4
import AlertComponent from "./AlertComponent";
4
import AlertComponent from './AlertComponent'
Línea 5... Línea 5...
5
 
5
 
6
const NotificationDiv = styled.div`
6
const NotificationDiv = styled.div`
7
  position: fixed;
7
  position: fixed;
8
  top: 1rem;
8
  top: 1rem;
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: 1100;
16
  z-index: 1100;
17
`;
17
`
18
const NotificationAlert = (props) => {
18
const NotificationAlert = (props) => {
19
  // redux destructuring
19
	// redux destructuring
20
  const { notifications } = props;
20
	const { notifications } = props
21
  return (
21
	return (
22
    <NotificationDiv>
22
		<NotificationDiv>
23
      {notifications.map((notification) => {
23
			{notifications.map((notification) => {
24
        return (
24
				return (
25
          <AlertComponent notification={notification} key={notification.id} />
25
					<AlertComponent notification={notification} key={notification.id} />
26
        );
26
				)
27
      })}
27
			})}
28
    </NotificationDiv>
28
		</NotificationDiv>
29
  );
29
	)
30
};
30
}
Línea 31... Línea 31...
31
 
31
 
32
const mapStateToProps = (state) => ({
32
const mapStateToProps = (state) => ({
33
  notifications: state.notification.notifications,
33
	notifications: state.notification.notifications,
Línea 34... Línea 34...
34
});
34
})
35
 
35
 
Línea 36... Línea 36...
36
// const mapDispatchToProps = {
36
// const mapDispatchToProps = {