import React, { Component } from 'react' import { Route } from 'react-router-dom' import { connect } from 'react-redux' import { history } from 'app/store' import actions from 'app/actions' import { MenuButton } from 'app/common' const mapStateToProps = state => ({ project: state.project, }) export default class ProjectMenu extends Component { render() { return (
) } } const ProjectIndexMenu = () => ([ , ]) const ProjectShowMenu = connect(mapStateToProps)((props) => ([ , , { const { res: project } = props.project.show if (confirm("Really delete this project?")) { actions.project.destroy(project).then(() => { history.push('/project/') }) } }} />, ])) const ProjectNewMenu = (props) => ([ , ]) const ProjectEditMenu = connect(mapStateToProps)((props) => ([ , { const { res: project } = props.project.show if (confirm("Really delete this project?")) { actions.project.destroy(project).then(() => { history.push('/project/') }) } }} />, ]))