Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as React from 'react';
- import { connect } from 'react-redux';
- import { changeStatus, removeTodo } from '../../actions/TodoActions';
- import { TodoImmutable } from '../../entities/Todo';
- import { List } from 'immutable';
- import {
- List as ListComponent, ListItem, Checkbox, ListItemText,
- ListItemSecondaryAction, IconButton, Card
- } from 'material-ui';
- import { CodeStatus } from '../../constants/constants';
- import DeleteIcon from 'material-ui-icons/Delete';
- import './TodoList.css';
- /**
- * Fonction d'appel des actions Redux
- * @param dispatch : fonction redux pour notifier le store
- */
- const mapDispatchToProps = (dispatch: Function) => {
- return {
- changeStatus: (todo: TodoImmutable) => dispatch(changeStatus(todo)),
- removeTodo: (todo: TodoImmutable) => dispatch(removeTodo(todo))
- };
- };
- /**
- * Fonction pour mapper le store sur les props du composant de liste
- * @param store : la todo-list
- */
- const mapStateToProps = (store: List<TodoImmutable>) => {
- return {
- todoList: store
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement