From 92e04da645301fbc1fd1a9e87ffe2f4feb313472 Mon Sep 17 00:00:00 2001 From: yashmantri Date: Tue, 9 Jul 2024 18:39:52 +0530 Subject: [PATCH] TP-62631 | Exotel call recording --- src/action/callRecordingActions.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/action/callRecordingActions.ts b/src/action/callRecordingActions.ts index 45b77ec7..08957c35 100644 --- a/src/action/callRecordingActions.ts +++ b/src/action/callRecordingActions.ts @@ -1,6 +1,9 @@ import axiosInstance, { ApiKeys, getApiUrl } from '@components/utlis/apiHelper'; import { logError } from '@components/utlis/errorUtils'; +import { navigateToScreen } from '@components/utlis/navigationUtlis'; import { setConnectingToCustomerBottomSheet } from '@reducers/activeCallSlice'; +import { toast } from '@rn-ui-lib/components/toast'; +import { BOTTOM_TAB_ROUTES } from '@screens/allCases/constants'; import { AppDispatch } from '@store'; export const makeACallToCustomer = (payload: any) => (dispatch: AppDispatch) => { @@ -10,6 +13,13 @@ export const makeACallToCustomer = (payload: any) => (dispatch: AppDispatch) => .post(url, payload) .then((res) => {}) .catch((err: Error) => { + dispatch(setConnectingToCustomerBottomSheet(false)); + toast({ + type: 'error', + onPress: () => navigateToScreen(BOTTOM_TAB_ROUTES.Profile), + text1: 'Call failed! Please retry calling Abhinav bindra upadhyaya again', + visibilityTime: 10000, + }); logError(err); }) .finally(() => {});