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:
Ashish Deo
2025-04-22 18:38:40 +05:30
committed by GitHub
parent da67548e9a
commit 282cd65d3b
2 changed files with 2 additions and 8 deletions

View File

@@ -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()

View File

@@ -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);