Added remove remote mount
This commit is contained in:
@@ -2,6 +2,7 @@ import * as Constants from '../../constants';
|
||||
import {createReducer} from 'redux-starter-kit';
|
||||
import {
|
||||
DISPLAY_CONFIGURATION,
|
||||
removeRemoteMount3,
|
||||
RESET_MOUNTS_STATE,
|
||||
SET_ALLOW_MOUNT,
|
||||
setAutoMountProcessed,
|
||||
@@ -62,6 +63,16 @@ export const createMountReducer = state => {
|
||||
DisplayRemoteConfiguration: action.payload.remote,
|
||||
};
|
||||
},
|
||||
[removeRemoteMount3]: (state, action) => {
|
||||
let providerState = {...state.ProviderState};
|
||||
delete providerState[action.payload];
|
||||
const remoteMounts = state.RemoteMounts.filter(i => i !== action.payload);
|
||||
return {
|
||||
...state,
|
||||
ProviderState: providerState,
|
||||
RemoteMounts: remoteMounts,
|
||||
};
|
||||
},
|
||||
[RESET_MOUNTS_STATE]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user