aotds-docks/src/dux/streamlining/index.js

23 lines
564 B
JavaScript
Raw Normal View History

2020-07-26 22:22:05 +00:00
import Updux from "updux";
import { action, payload } from "ts-action";
2021-05-17 13:48:31 +00:00
import u from "@yanick/updeep";
2020-07-26 22:22:05 +00:00
import { createSelector } from "reselect";
const dux = new Updux({
initial: {
type: 'none',
cost: 0,
mass: 0,
},
});
const set_streamlining = action('set_streamlining',payload());
2021-05-17 13:48:31 +00:00
dux.addMutation(set_streamlining, type => u.update({type}) );
2020-07-26 22:22:05 +00:00
const set_streamlining_cost_mass = action('set_streamlining_cost_mass',payload());
2021-05-17 13:48:31 +00:00
dux.addMutation( set_streamlining_cost_mass, reqs => u.update(reqs) );
2020-07-26 22:22:05 +00:00
export default dux.asDux;