-
"""
end
+ @spec tooltip(any) :: Phoenix.LiveView.Rendered.t()
def tooltip(assigns) do
~H"""
"""
end
+
+ @spec loading_state(any) :: Phoenix.LiveView.Rendered.t()
+ def loading_state(assigns) do
+ ~H"""
+ <%= if @condition do %>
+ <%= @content %>
+ <% else %>
+
+ <%= @mock %>
+
+ <% end %>
+
+
+ """
+ end
end
diff --git a/lib/starknet_explorer_web/live/pages/home/index.ex b/lib/starknet_explorer_web/live/pages/home/index.ex
index d7da67bb..b489aeed 100644
--- a/lib/starknet_explorer_web/live/pages/home/index.ex
+++ b/lib/starknet_explorer_web/live/pages/home/index.ex
@@ -72,8 +72,14 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
-
Blocks Height
-
<%= assigns.block_height %>
+
Blocks Height
+
+
+
@@ -88,7 +94,14 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
Messages
-
<%= @entities_count.messages_count %>
+
+
+
@@ -103,7 +116,14 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
Events
-
<%= @entities_count.events_count %>
+
+
+
@@ -118,7 +138,16 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
Transactions
-
<%= @entities_count.transaction_count %>
+
@@ -150,39 +179,74 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
Status
Age
- <%= for block <- Enum.take(@blocks, 15) do %>
-
+ <%= for n <- 1..15 do %>
+
Block Hash
-
Status
-
- <%= block.status %>
+ " info-label" end}"}>
+
Age
- <%= Utils.get_block_age(block) %>
+
<% end %>
@@ -208,44 +272,76 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
Status
Age
- <%= for {transaction, idx} <- Enum.take(Enum.with_index(@transactions), 15) do %>
-
+ <%= for n <- 1..15 do %>
+
Type
-
-
- <%= transaction.type %>
+ " type" end }"}>
+
+
+ <%= %>
Status
-
- <%= transaction.block_status %>
+ " info-label" end}"}>
+
Age
- <%= Utils.get_block_age_from_timestamp(transaction.block_timestamp) %>
+
<% end %>
+
@@ -294,7 +390,7 @@ defmodule StarknetExplorerWeb.HomeLive.Index do
{:ok, block_height} = StarknetExplorer.Rpc.get_block_height(socket.assigns.network)
block_height = StarknetExplorer.Utils.format_number_for_display(block_height)
- assign(socket,
+ assign(socket,
blocks: blocks,
transactions: transactions,
entities_count: entities_count,