From 36e35768c193463c8ec7da2af6e171deba3fdcd2 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sat, 26 Mar 2022 17:17:43 +0100 Subject: [PATCH] do not show account details if there are no accounts --- http-client/src/components/accounts.rs | 10 +++++++--- http-client/src/components/main.rs | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/http-client/src/components/accounts.rs b/http-client/src/components/accounts.rs index c484b93..b550737 100644 --- a/http-client/src/components/accounts.rs +++ b/http-client/src/components/accounts.rs @@ -40,9 +40,13 @@ impl Component for Accounts { fn view(&self, ctx: &Context) -> Html { html! { <> - + if ctx.props().account_nrs.is_empty() { +

{"No accounts"}

+ } else { + + } } } diff --git a/http-client/src/components/main.rs b/http-client/src/components/main.rs index 39cc525..6b73c3a 100644 --- a/http-client/src/components/main.rs +++ b/http-client/src/components/main.rs @@ -100,8 +100,10 @@ impl Component for Main { {"welcome to your vaults"}
- - + + if !self.account_nrs.is_empty() { + + }