af83/chouette-core

View on GitHub
app/packs/src/time_tables/containers/CancelTimetable.js

Summary

Maintainability
A
0 mins
Test Coverage
import { connect } from 'react-redux'
import actions from '../actions'
import CancelTimetableComponent from '../components/CancelTimetable'

const mapStateToProps = (state) => {
  return {
    status: state.status
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    onConfirmCancel: () => {
      let { pathname, origin } = window.location
      let path = pathname.split('/', 5).join('/')
      window.location = origin + path
    }
  }
}
const CancelTimetable = connect(mapStateToProps, mapDispatchToProps)(CancelTimetableComponent)

export default CancelTimetable