TP-62631 | Exotel call recording

This commit is contained in:
yashmantri
2024-07-09 18:39:52 +05:30
parent d8e3ee0b1c
commit 92e04da645

View File

@@ -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(() => {});