TP-62631 | Exotel call recording
This commit is contained in:
@@ -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(() => {});
|
||||
|
||||
Reference in New Issue
Block a user