passing editing status to map

This commit is contained in:
Fedor Katurov 2019-12-30 16:41:37 +07:00
parent 58eefd5670
commit 9c3c8cf46d
10 changed files with 213 additions and 65 deletions

View file

@ -1,5 +1,6 @@
import { MAP_ACTIONS } from "./constants";
import { IMapReducer } from "./";
import { IStickerDump } from "$modules/Sticker";
export const mapSet = (map: Partial<IMapReducer>) => ({
type: MAP_ACTIONS.SET_MAP,
@ -15,3 +16,14 @@ export const mapSetRoute = (route: IMapReducer['route']) => ({
type: MAP_ACTIONS.SET_ROUTE,
route,
});
export const mapSetSticker = (index: number, sticker: IStickerDump) => ({
type: MAP_ACTIONS.SET_STICKER,
index,
sticker,
});
export const mapDropSticker = (index: number) => ({
type: MAP_ACTIONS.DROP_STICKER,
index,
});