mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
separated map and user reducers
This commit is contained in:
parent
9f8cb1a875
commit
b75c028ce1
14 changed files with 849 additions and 768 deletions
|
@ -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,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue