blob: ac1a21485c52a09c6c1d12b3265fc9edaac15c3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { h, Component } from 'preact'
import { Link } from 'react-router-dom'
import client from '../client.js'
import { connect } from 'react-redux'
import { setContent, setStyle, setAlpha, createTask } from '../actions'
import TaskFormView from '../components/Tasks/TaskFormView.jsx'
const mapStateToProps = (state) => state.currentTask
const mapDispatchToProps = {
clearContent: () => setContent(null),
clearStyle: () => setStyle(null),
setAlpha: (alpha) => setAlpha(alpha),
createTask: () => createTask(),
}
const TaskForm = connect(
mapStateToProps,
mapDispatchToProps
)(TaskFormView)
export default TaskForm
|