From 61946929d270ec2c95946044ba47835e541d7654 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Wed, 30 Jan 2019 22:47:28 +0100 Subject: [PATCH] Cleanup redirection url in redux state. --- client/src/reducers/Portal/Authentication/actions.ts | 7 +------ client/src/reducers/Portal/Authentication/reducer.ts | 8 -------- client/src/reducers/constants.ts | 3 --- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/client/src/reducers/Portal/Authentication/actions.ts b/client/src/reducers/Portal/Authentication/actions.ts index 6402f0989..ff0da5dc1 100644 --- a/client/src/reducers/Portal/Authentication/actions.ts +++ b/client/src/reducers/Portal/Authentication/actions.ts @@ -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); -}) \ No newline at end of file +}); \ No newline at end of file diff --git a/client/src/reducers/Portal/Authentication/reducer.ts b/client/src/reducers/Portal/Authentication/reducer.ts index c5ef18c08..c298ebe10 100644 --- a/client/src/reducers/Portal/Authentication/reducer.ts +++ b/client/src/reducers/Portal/Authentication/reducer.ts @@ -6,15 +6,12 @@ import RemoteState from '../../../views/AuthenticationView/RemoteState'; export type Action = ActionType; 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; } \ No newline at end of file diff --git a/client/src/reducers/constants.ts b/client/src/reducers/constants.ts index 4b9784d9f..232e13ce7 100644 --- a/client/src/reducers/constants.ts +++ b/client/src/reducers/constants.ts @@ -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';