From cb2aa1839c0337a0fc414179760cb18fd8780a45 Mon Sep 17 00:00:00 2001 From: Urix <43704209+uri-99@users.noreply.github.com> Date: Sat, 21 Dec 2024 16:02:40 -0300 Subject: [PATCH] fix: setting values in frontend --- .../live/pages/home/index.html.heex | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/explorer/lib/explorer_web/live/pages/home/index.html.heex b/explorer/lib/explorer_web/live/pages/home/index.html.heex index ae8defc57..2c94c086b 100644 --- a/explorer/lib/explorer_web/live/pages/home/index.html.heex +++ b/explorer/lib/explorer_web/live/pages/home/index.html.heex @@ -10,33 +10,29 @@ > <%= if @operators_registered != :empty do %> <%= @operators_registered %> - <% else %> - 0 <% end %> <.card_link - icon="hero-arrow-right-solid" - navigate={~p"/restake"} - title="Total Restaked" - subtitle={"(#{@restaked_amount_eth |> Helpers.format_number()} ETH)"}> - <%= if @restaked_amount_eth != :nil do %> - <%= @restaked_amount_usd |> Helpers.format_number() %> USD - <% else %> - 0 - <% end %> + icon="hero-arrow-right-solid" + navigate={~p"/restake"} + title="Total Restaked" + subtitle={ + if @restaked_amount_eth |> Helpers.format_number() != nil do + "(#{@restaked_amount_eth |> Helpers.format_number()} ETH)" + end + }> + <%= if @restaked_amount_usd |> Helpers.format_number() != nil do %> + <%= @restaked_amount_usd |> Helpers.format_number() %> USD + <% end %> <.card title="verified batches"> <%= if @verified_batches != :empty do %> <%= @verified_batches |> Helpers.format_number() %> - <% else %> - 0 <% end %> <.card title="Verified Proofs" class="-mt-0.5 md:mt-0"> <%= if @verified_proofs != :empty do %> <%= @verified_proofs |> Helpers.format_number() %> - <% else %> - 0 <% end %> <.live_component module={ContractsComponent} id="contracts_card" class="sm:col-span-2" />