Cleanup redirection url in redux state.

This commit is contained in:
Clement Michaud 2019-01-30 22:47:28 +01:00
parent d2a547eca6
commit 61946929d2
3 changed files with 1 additions and 17 deletions

View File

@ -3,7 +3,6 @@ import {
FETCH_STATE_REQUEST, FETCH_STATE_REQUEST,
FETCH_STATE_SUCCESS, FETCH_STATE_SUCCESS,
FETCH_STATE_FAILURE, FETCH_STATE_FAILURE,
SET_REDIRECTION_URL,
} from "../../constants"; } from "../../constants";
import RemoteState from '../../../views/AuthenticationView/RemoteState'; import RemoteState from '../../../views/AuthenticationView/RemoteState';
@ -19,7 +18,3 @@ export const fetchStateFailure = createAction(FETCH_STATE_FAILURE, resolve => {
return resolve(err); return resolve(err);
} }
}); });
export const setRedirectionUrl = createAction(SET_REDIRECTION_URL, resolve => {
return (url: string) => resolve(url);
})

View File

@ -6,15 +6,12 @@ import RemoteState from '../../../views/AuthenticationView/RemoteState';
export type Action = ActionType<typeof Actions>; export type Action = ActionType<typeof Actions>;
interface State { interface State {
redirectionUrl : string | null;
remoteState: RemoteState | null; remoteState: RemoteState | null;
remoteStateLoading: boolean; remoteStateLoading: boolean;
remoteStateError: string | null; remoteStateError: string | null;
} }
const initialState: State = { const initialState: State = {
redirectionUrl: null,
remoteState: null, remoteState: null,
remoteStateLoading: false, remoteStateLoading: false,
remoteStateError: null, remoteStateError: null,
@ -41,11 +38,6 @@ export default (state = initialState, action: Action): State => {
remoteStateError: action.payload, remoteStateError: action.payload,
remoteStateLoading: false, remoteStateLoading: false,
}; };
case getType(Actions.setRedirectionUrl):
return {
...state,
redirectionUrl: action.payload,
}
} }
return state; return state;
} }

View File

@ -4,9 +4,6 @@ export const FETCH_STATE_SUCCESS = '@portal/fetch_state_success';
export const FETCH_STATE_FAILURE = '@portal/fetch_state_failure'; export const FETCH_STATE_FAILURE = '@portal/fetch_state_failure';
// AUTHENTICATION PROCESS // AUTHENTICATION PROCESS
export const SET_REDIRECTION_URL = '@portal/authenticate/set_redirection_url';
export const AUTHENTICATE_REQUEST = '@portal/authenticate_request'; export const AUTHENTICATE_REQUEST = '@portal/authenticate_request';
export const AUTHENTICATE_SUCCESS = '@portal/authenticate_success'; export const AUTHENTICATE_SUCCESS = '@portal/authenticate_success';
export const AUTHENTICATE_FAILURE = '@portal/authenticate_failure'; export const AUTHENTICATE_FAILURE = '@portal/authenticate_failure';