NTP-50551 | Redirection to cases fix (#1432)
* NTP-50551 | Redirection to cases fix * NTP-50551 | Redirection to cases fix * NTP-50551 | Redirection to cases fix
This commit is contained in:
@@ -159,8 +159,7 @@ export const signInWithGoogle = () => {
|
||||
};
|
||||
|
||||
export const exchangeSession =
|
||||
(code: string, state: string, navigateToCases: () => void, fcmToken: string) =>
|
||||
(dispatch: Dispatch) => {
|
||||
(code: string, state: string, fcmToken: string) => (dispatch: Dispatch) => {
|
||||
const url = getApiUrl(ApiKeys.OAUTH_EXCHANGE_SESSION);
|
||||
const codeVerifier = localStorage.getItem(CODE_VERIFIER);
|
||||
|
||||
@@ -196,7 +195,6 @@ export const exchangeSession =
|
||||
response.data.longhornFirebaseToken
|
||||
);
|
||||
dispatch(setFormLoading(false));
|
||||
navigateToCases();
|
||||
const authParams = {
|
||||
sessionId: response.data.accessToken,
|
||||
deviceId: getDeviceId()
|
||||
|
||||
@@ -62,10 +62,6 @@ const MobileNumberInputScreen = () => {
|
||||
signInWithGoogle();
|
||||
};
|
||||
|
||||
const handleNavigateToCases = () => {
|
||||
navigate(APP_ROUTES.CASES.path, { replace: true });
|
||||
};
|
||||
|
||||
const handleMobileNumberError = useMemo(() => {
|
||||
if (phoneNumber.length < 10 && !isPristine) {
|
||||
return 'Enter 10 digit valid mobile number';
|
||||
@@ -90,7 +86,7 @@ const MobileNumberInputScreen = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
dispatch(exchangeSession(code, state, handleNavigateToCases, fcmToken));
|
||||
dispatch(exchangeSession(code, state, fcmToken));
|
||||
};
|
||||
|
||||
const decodedUri = decodeURIComponent(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user