diff --git a/src/components/ImportOnyxState/index.native.tsx b/src/components/ImportOnyxState/index.native.tsx
index d4b2dcfed446..bdd805241c55 100644
--- a/src/components/ImportOnyxState/index.native.tsx
+++ b/src/components/ImportOnyxState/index.native.tsx
@@ -46,7 +46,7 @@ function applyStateInChunks(state: OnyxValues) {
return promise;
}
-export default function ImportOnyxState({setIsLoading, isLoading}: ImportOnyxStateProps) {
+export default function ImportOnyxState({setIsLoading}: ImportOnyxStateProps) {
const [isErrorModalVisible, setIsErrorModalVisible] = useState(false);
const [session] = useOnyx(ONYXKEYS.SESSION);
@@ -71,14 +71,7 @@ export default function ImportOnyxState({setIsLoading, isLoading}: ImportOnyxSta
})
.catch(() => {
setIsErrorModalVisible(true);
- })
- .finally(() => {
- setIsLoading(false);
});
-
- if (isLoading) {
- setIsLoading(false);
- }
};
return (
diff --git a/src/components/ImportOnyxState/index.tsx b/src/components/ImportOnyxState/index.tsx
index e3c4fc6109f7..2f9a2b70b65b 100644
--- a/src/components/ImportOnyxState/index.tsx
+++ b/src/components/ImportOnyxState/index.tsx
@@ -11,7 +11,7 @@ import BaseImportOnyxState from './BaseImportOnyxState';
import type ImportOnyxStateProps from './types';
import {cleanAndTransformState} from './utils';
-export default function ImportOnyxState({setIsLoading, isLoading}: ImportOnyxStateProps) {
+export default function ImportOnyxState({setIsLoading}: ImportOnyxStateProps) {
const [isErrorModalVisible, setIsErrorModalVisible] = useState(false);
const [session] = useOnyx(ONYXKEYS.SESSION);
@@ -33,24 +33,16 @@ export default function ImportOnyxState({setIsLoading, isLoading}: ImportOnyxSta
setPreservedUserSession(currentUserSessionCopy);
setShouldForceOffline(true);
Onyx.clear(KEYS_TO_PRESERVE).then(() => {
- Onyx.multiSet(transformedState)
- .then(() => {
- setIsUsingImportedState(true);
- Navigation.navigate(ROUTES.HOME);
- })
- .finally(() => {
- setIsLoading(false);
- });
+ Onyx.multiSet(transformedState).then(() => {
+ setIsUsingImportedState(true);
+ Navigation.navigate(ROUTES.HOME);
+ });
});
})
.catch(() => {
setIsErrorModalVisible(true);
setIsLoading(false);
});
-
- if (isLoading) {
- setIsLoading(false);
- }
};
return (
diff --git a/src/components/ImportOnyxState/types.ts b/src/components/ImportOnyxState/types.ts
index 8e504c493529..2b4b56a3b20c 100644
--- a/src/components/ImportOnyxState/types.ts
+++ b/src/components/ImportOnyxState/types.ts
@@ -1,5 +1,4 @@
type ImportOnyxStateProps = {
- isLoading: boolean;
setIsLoading: (isLoading: boolean) => void;
};
diff --git a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
index bd0ce596c733..defc5eb941ac 100644
--- a/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
+++ b/src/pages/settings/Troubleshoot/TroubleshootPage.tsx
@@ -144,10 +144,7 @@ function TroubleshootPage() {
/>
-
+