Skip to content

Commit cd221e2

Browse files
committed
fix: conditionally render account info on transactions page
1 parent 3fcaefa commit cd221e2

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

lib/algora_web/live/org/transactions_live.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,12 @@ defmodule AlgoraWeb.Org.TransactionsLive do
363363
</dd>
364364
</div>
365365
<div>
366-
<dt class="text-sm font-medium text-muted-foreground">Country</dt>
367-
<dd class="text-sm font-semibold">
368-
{Algora.PSP.ConnectCountries.from_code(@account.country)}
369-
</dd>
366+
<%= if @account.country do %>
367+
<dt class="text-sm font-medium text-muted-foreground">Country</dt>
368+
<dd class="text-sm font-semibold">
369+
{Algora.PSP.ConnectCountries.from_code(@account.country)}
370+
</dd>
371+
<% end %>
370372
</div>
371373
<div>
372374
<dt class="text-sm font-medium text-muted-foreground">Can Accept Payments</dt>

lib/algora_web/live/user/transactions_live.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,12 @@ defmodule AlgoraWeb.User.TransactionsLive do
375375
</dd>
376376
</div>
377377
<div>
378-
<dt class="text-sm font-medium text-muted-foreground">Country</dt>
379-
<dd class="text-sm font-semibold">
380-
{Algora.PSP.ConnectCountries.from_code(@account.country)}
381-
</dd>
378+
<%= if @account.country do %>
379+
<dt class="text-sm font-medium text-muted-foreground">Country</dt>
380+
<dd :if={@account.country} class="text-sm font-semibold">
381+
{Algora.PSP.ConnectCountries.from_code(@account.country)}
382+
</dd>
383+
<% end %>
382384
</div>
383385
<div>
384386
<dt class="text-sm font-medium text-muted-foreground">Can Accept Payments</dt>

0 commit comments

Comments
 (0)