Skip to content
Snippets Groups Projects
Unverified Commit 06b2a875 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:bug: (nordigen) perform status check only if server is online (#1127)

Small bugfix for nordigen.

Do not perform the server status check if the user is actually offline.
parent 0e2b317e
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,12 @@ import { useEffect, useState } from 'react';
import { send } from 'loot-core/src/platform/client/fetch';
import useSyncServerStatus from './useSyncServerStatus';
export default function useNordigenStatus() {
const [configured, setConfigured] = useState<boolean | null>(null);
const [isLoading, setIsLoading] = useState(false);
const [status] = useSyncServerStatus();
useEffect(() => {
async function fetch() {
......@@ -16,8 +19,10 @@ export default function useNordigenStatus() {
setIsLoading(false);
}
fetch();
}, [setConfigured, setIsLoading]);
if (status === 'online') {
fetch();
}
}, [status]);
return {
configured,
......
---
category: Bugfix
authors: [MatissJanis]
---
Nordigen: do not perform status check if server is offline
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment