TP-65182 | App slowness fix

This commit is contained in:
yashmantri
2024-05-14 23:28:46 +05:30
parent 48ae4860e1
commit 08b2a72d39
7 changed files with 44 additions and 50 deletions

View File

@@ -80,19 +80,13 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
const isOnline = useIsOnline();
const dispatch = useAppDispatch();
const appState = useRef(AppState.currentState);
const {
isTeamLead,
caseSyncLock,
referenceId,
pendingList = [],
pinnedList = [],
} = useAppSelector((state) => ({
isTeamLead: state.user.isTeamLead,
caseSyncLock: state?.user?.caseSyncLock,
referenceId: state.user.user?.referenceId!,
pendingList: state.allCases.pendingList,
pinnedList: state.allCases.pinnedList,
}));
const isTeamLead = useAppSelector((state) => state.user.isTeamLead);
const caseSyncLock = useAppSelector((state) => state?.user?.caseSyncLock);
const referenceId = useAppSelector((state) => state.user.user?.referenceId!);
const pendingList = useAppSelector((state) => state.allCases.pendingList);
const pinnedList = useAppSelector((state) => state.allCases.pinnedList);
const handleTimeSync = async () => {
try {