Current section

Files

Jump to
slurpee lib slurpee_web live new_head_subscription_live.html.leex
Raw

lib/slurpee_web/live/new_head_subscription_live.html.leex

<div class="flex justify-between mt-4">
<h2 class="text-3xl">New Head Subscriptions</h2>
</div>
<table class="w-full mt-4">
<thead>
<tr>
<th scope="col" class="px-4 py-2">Blockchain ID</th>
<th scope="col" class="px-4 py-2">Enabled</th>
<th scope="col" class="px-4 py-2">Handler</th>
</tr>
</thead>
<tbody>
<%= if Enum.any?(@new_head_subscriptions) do %>
<%= for s <- @new_head_subscriptions do %>
<tr>
<th scope="row" class="border px-4 py-2"><%= s.blockchain_id %></th>
<td class="border px-4 py-2 <%= !s.enabled && "text-gray-400"%>"><%= s.enabled %></td>
<td class="border px-4 py-2 <%= !s.enabled && "text-gray-400"%>"><%= s.handler |> inspect %></td>
</tr>
<% end %>
<% else %>
<tr>
<td colspan="3" class="border px-4 py-2">no new head subscriptions configured</td>
</tr>
<% end %>
</tbody>
</table>