From c8adb5fc853825a58252ece354d6131a8226c5bd Mon Sep 17 00:00:00 2001 From: "aman.singh" Date: Wed, 24 Apr 2024 12:55:46 +0530 Subject: [PATCH] TP-22332 |changed axios inatance form axiois| Aman Singh --- App.tsx | 2 +- src/common/TrackingComponent.tsx | 2 +- src/services/CalendarSyncService.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/App.tsx b/App.tsx index 020b22d8..af850f0c 100644 --- a/App.tsx +++ b/App.tsx @@ -9,7 +9,7 @@ import { PermissionsAndroid, Platform, StatusBar, - type Permission + type Permission, } from 'react-native'; import { default as codePush, default as CodePush } from 'react-native-code-push'; import { Provider } from 'react-redux'; diff --git a/src/common/TrackingComponent.tsx b/src/common/TrackingComponent.tsx index d86b428d..5e95c436 100644 --- a/src/common/TrackingComponent.tsx +++ b/src/common/TrackingComponent.tsx @@ -304,7 +304,7 @@ const TrackingComponent: React.FC = ({ children }) => { { taskId: FOREGROUND_TASKS.DATA_SYNC_JOB, task: getSyncUrl, - delay: 0.5 * MILLISECONDS_IN_A_MINUTE, // 30 minutes + delay: 10 * MILLISECONDS_IN_A_MINUTE, // 30 minutes onLoop: true, } ]; diff --git a/src/services/CalendarSyncService.ts b/src/services/CalendarSyncService.ts index 061b23df..c7b63a85 100644 --- a/src/services/CalendarSyncService.ts +++ b/src/services/CalendarSyncService.ts @@ -4,6 +4,7 @@ import axiosInstance, { API_STATUS_CODE } from '../components/utlis/apiHelper'; import { getGzipData } from '../components/utlis/commonFunctions'; import { logError } from '../components/utlis/errorUtils'; import { sendAckToServer } from './deviceDataSyncService'; +import axios from 'axios'; @@ -17,7 +18,7 @@ export const calendarSyncService = async (params: { const data = JSON.stringify({ data: calendarEvents }); getGzipData(data) .then((compressedData) => { - axiosInstance + axios .post(params.preSignedUrl, compressedData, { headers: { 'Content-Type': 'application/json',