separated map and user reducers

This commit is contained in:
Fedor Katurov 2019-12-30 21:01:01 +07:00
parent 9f8cb1a875
commit b75c028ce1
14 changed files with 849 additions and 768 deletions

View file

@ -24,6 +24,11 @@ export const mapSetSticker = (index: number, sticker: IStickerDump) => ({
sticker,
});
export const mapAddSticker = (sticker: IStickerDump) => ({
type: MAP_ACTIONS.ADD_STICKER,
sticker,
});
export const mapDropSticker = (index: number) => ({
type: MAP_ACTIONS.DROP_STICKER,
index,
@ -33,3 +38,28 @@ export const mapClicked = (latlng: ILatLng) => ({
type: MAP_ACTIONS.MAP_CLICKED,
latlng,
});
export const mapSetTitle = (title: string) => ({
type: MAP_ACTIONS.SET_TITLE,
title,
});
export const mapSetDescription = (description: string) => ({
type: MAP_ACTIONS.SET_DESCRIPTION,
description,
});
export const mapSetAddress = (address: string) => ({
type: MAP_ACTIONS.SET_ADDRESS,
address,
});
export const mapSetOwner = (owner: IMapReducer['owner']) => ({
type: MAP_ACTIONS.SET_DESCRIPTION,
owner,
});
export const mapSetPublic = (is_public: IMapReducer['is_public']) => ({
type: MAP_ACTIONS.SET_PUBLIC,
is_public,
});