From 2aa7fa042679e2cd01c46c97590620854cf084b7 Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Wed, 1 Sep 2021 13:41:42 +0100 Subject: [PATCH] move balance function call to global state --- tauri-wallet/src/components/NavigationCards.tsx | 4 ---- tauri-wallet/src/context/main.tsx | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tauri-wallet/src/components/NavigationCards.tsx b/tauri-wallet/src/components/NavigationCards.tsx index 44e52683d6..dfdd254503 100644 --- a/tauri-wallet/src/components/NavigationCards.tsx +++ b/tauri-wallet/src/components/NavigationCards.tsx @@ -18,10 +18,6 @@ export const BalanceCard = () => { const { balance, balanceError, balanceLoading, getBalance } = useContext(ClientContext) - useEffect(() => { - getBalance() - }, []) - return (
{ + getBalance() + }, []) + const logIn = (clientDetails: TClientDetails) => setClientDetails(clientDetails)