Cleanup redirection url in redux state.
parent
d2a547eca6
commit
61946929d2
|
@ -3,7 +3,6 @@ import {
|
|||
FETCH_STATE_REQUEST,
|
||||
FETCH_STATE_SUCCESS,
|
||||
FETCH_STATE_FAILURE,
|
||||
SET_REDIRECTION_URL,
|
||||
} from "../../constants";
|
||||
import RemoteState from '../../../views/AuthenticationView/RemoteState';
|
||||
|
||||
|
@ -18,8 +17,4 @@ export const fetchStateFailure = createAction(FETCH_STATE_FAILURE, resolve => {
|
|||
return (err: string) => {
|
||||
return resolve(err);
|
||||
}
|
||||
});
|
||||
|
||||
export const setRedirectionUrl = createAction(SET_REDIRECTION_URL, resolve => {
|
||||
return (url: string) => resolve(url);
|
||||
})
|
||||
});
|
|
@ -6,15 +6,12 @@ import RemoteState from '../../../views/AuthenticationView/RemoteState';
|
|||
export type Action = ActionType<typeof Actions>;
|
||||
|
||||
interface State {
|
||||
redirectionUrl : string | null;
|
||||
remoteState: RemoteState | null;
|
||||
remoteStateLoading: boolean;
|
||||
remoteStateError: string | null;
|
||||
}
|
||||
|
||||
const initialState: State = {
|
||||
redirectionUrl: null,
|
||||
|
||||
remoteState: null,
|
||||
remoteStateLoading: false,
|
||||
remoteStateError: null,
|
||||
|
@ -41,11 +38,6 @@ export default (state = initialState, action: Action): State => {
|
|||
remoteStateError: action.payload,
|
||||
remoteStateLoading: false,
|
||||
};
|
||||
case getType(Actions.setRedirectionUrl):
|
||||
return {
|
||||
...state,
|
||||
redirectionUrl: action.payload,
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
|
@ -4,9 +4,6 @@ export const FETCH_STATE_SUCCESS = '@portal/fetch_state_success';
|
|||
export const FETCH_STATE_FAILURE = '@portal/fetch_state_failure';
|
||||
|
||||
// AUTHENTICATION PROCESS
|
||||
|
||||
export const SET_REDIRECTION_URL = '@portal/authenticate/set_redirection_url';
|
||||
|
||||
export const AUTHENTICATE_REQUEST = '@portal/authenticate_request';
|
||||
export const AUTHENTICATE_SUCCESS = '@portal/authenticate_success';
|
||||
export const AUTHENTICATE_FAILURE = '@portal/authenticate_failure';
|
||||
|
|
Loading…
Reference in New Issue