From 78bf91ea8ef1a331208374d7b0c538e63628d8f6 Mon Sep 17 00:00:00 2001 From: bhavanakarwade Date: Mon, 9 Dec 2024 10:46:49 +0530 Subject: [PATCH] implemented delay function --- src/api/Auth.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/api/Auth.ts b/src/api/Auth.ts index 8ad6b338..d02c9837 100644 --- a/src/api/Auth.ts +++ b/src/api/Auth.ts @@ -268,7 +268,6 @@ export const decryptData = (value: string): string => { export const setToLocalStorage = async (key: string, value: any) =>{ - await delay(2000); // 2-second delay before setting data // If passed value is object then checked empty object if (typeof value === 'object' && Boolean(Object.keys(value).length <= 0)) { @@ -288,7 +287,7 @@ export const setToLocalStorage = async (key: string, value: any) =>{ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); export const getFromLocalStorage = async (key: string) => { - await delay(2000); // 2-second delay + await delay(1000); // 2-second delay try { const encryptedValue = localStorage.getItem(key);