feat: reviewed and simplified the node status check (#63)

* refactor: status page nested ternary logic

* refactor: move the fetch latest bee release to a hook

* refactor: solved node status rerendering, improved performance and clarity

* refactor: step components now use unified hooks interface

* style: removed component margins, layout should be handled by pages
This commit is contained in:
Vojtech Simetka
2021-04-09 15:09:17 +02:00
committed by GitHub
parent 5608b91966
commit 9e4e58f160
14 changed files with 656 additions and 764 deletions
+21
View File
@@ -4,3 +4,24 @@ interface LatestBeeRelease {
name: string
html_url: string
}
interface StatusHookCommon {
isLoading: boolean
isOk: boolean
}
interface StatusNodeVersionHook extends StatusHookCommon {
userVersion: string
latestVersion: string
latestUrl: string
}
interface StatusEthereumConnectionHook extends StatusHookCommon {
nodeAddresses: NodeAddresses | null
}
interface StatusTopologyHook extends StatusHookCommon {
topology: Topology | null
}
interface StatusChequebookHook extends StatusHookCommon {
chequebookBalance: ChequebookBalanceResponse | null
chequebookAddress: ChequebookAddressResponse | null
}