mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
save: public switch
This commit is contained in:
parent
69f23c9e48
commit
b7f2c7c382
10 changed files with 31 additions and 27 deletions
|
@ -152,6 +152,11 @@ const searchSetLoading = (state, { loading = false }) => ({
|
|||
}
|
||||
});
|
||||
|
||||
const setPublic = (state, { is_public = false }) => ({
|
||||
...state,
|
||||
is_public,
|
||||
});
|
||||
|
||||
const HANDLERS = ({
|
||||
[ACTIONS.SET_USER]: setUser,
|
||||
[ACTIONS.SET_EDITING]: setEditing,
|
||||
|
@ -185,6 +190,7 @@ const HANDLERS = ({
|
|||
[ACTIONS.SEARCH_SET_TAB]: searchSetTab,
|
||||
[ACTIONS.SEARCH_PUT_ROUTES]: searchPutRoutes,
|
||||
[ACTIONS.SEARCH_SET_LOADING]: searchSetLoading,
|
||||
[ACTIONS.SET_PUBLIC]: setPublic,
|
||||
}: { [key: String]: Function });
|
||||
|
||||
export const INITIAL_STATE = {
|
||||
|
@ -201,6 +207,7 @@ export const INITIAL_STATE = {
|
|||
address: '',
|
||||
changed: false,
|
||||
provider: DEFAULT_PROVIDER,
|
||||
is_public: false,
|
||||
|
||||
save_error: '',
|
||||
save_finished: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue