import React, { Component } from 'react' import { connect } from 'react-redux' import { history } from 'app/store' import actions from 'app/actions' import { Loader } from 'app/common' import EpisodeForm from '../components/episode.form' import EpisodeMenu from '../components/episode.menu' class EpisodeEdit extends Component { componentDidMount() { console.log(this.props.match.params.id) actions.episode.show(this.props.match.params.id) } handleSubmit(data) { actions.episode.update(data) .then(response => { // response console.log(response) history.push('/episode/') }) } render() { const { show } = this.props.episode if (show.loading || !show.res) { return (