added actions

This commit is contained in:
muerwre 2019-03-06 17:27:19 +07:00
parent d42586d9e0
commit f8d2b6a5bd
6 changed files with 40 additions and 6 deletions

View file

@ -71,3 +71,8 @@ export const mapsSetShift = (shift: number) => ({ type: ACTIONS.MAPS_SET_SHIFT,
export const setFeature = (features: { [x: string]: boolean }) => ({ type: ACTIONS.SET_FEATURE, features });
export const setIsRouting = (is_routing: boolean) => ({ type: ACTIONS.SET_IS_ROUTING, is_routing });
export const dropRoute = (_id: string) => ({ type: ACTIONS.DROP_ROUTE, _id });
export const modifyRoute = (_id: string, { title, is_public }: { title: string, is_public: boolean }) => ({
type: ACTIONS.MODIFY_ROUTE, _id, title, is_public
});

View file

@ -78,4 +78,7 @@ export const ACTIONS: IActions = {
SET_FEATURE: 'SET_FEATURE',
SET_IS_ROUTING: 'SET_IS_ROUTING',
DROP_ROUTE: 'DROP_ROUTE',
MODIFY_ROUTE: 'MODIFY_ROUTE',
};