Skip to content

Commit

Permalink
Fix whitespaces when no live resource is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo0807 committed Dec 21, 2023
1 parent ad9cf13 commit 8fa80f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/backpex/fields/has_many.ex
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ defmodule Backpex.Fields.HasMany do

~H"""
<%= if is_nil(@link) do %>
<p class={@live_action in [:index, :resource_action] && "truncate"}>
<span class={@live_action in [:index, :resource_action] && "truncate"}>
<%= HTML.pretty_value(@display_text) %>
</p>
</span>
<% else %>
<.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}>
<%= @display_text %>
Expand Down
4 changes: 2 additions & 2 deletions lib/backpex/fields/many_to_many.ex
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ defmodule Backpex.Fields.ManyToMany do

~H"""
<%= if is_nil(@link) do %>
<p class={@live_action in [:index, :resource_action] && "truncate"}>
<span class={@live_action in [:index, :resource_action] && "truncate"}>
<%= HTML.pretty_value(@display_text) %>
</p>
</span>
<% else %>
<.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}>
<%= @display_text %>
Expand Down

0 comments on commit 8fa80f4

Please sign in to comment.