I have two problems in my code:
<button
phx-click="select_horse"
phx-value-horse_id="{horse.id}"
{unless assigns.race_in_progress || assigns.race_ended || assigns.coins == 0, do: "", else: "disabled" }
class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md
<%= if assigns.selected_horse_id == horse.id, do: "bg-blue-600 text-white animate-pulse", else: "bg-white text-gray-700 hover:bg-gray-100" %>
mr-4 mb-4 <%= unless assigns.race_in_progress || assigns.race_ended || assigns.coins == 0, do: "", else: "opacity-50 cursor-not-allowed" %>"
>
<%= horse.emoji %> <%= horse.name %>
</button>
here at <%= if assigns
its saying:
Make sure the attribute is properly closed. This may also happen if
there is an EEx interpolation inside a tag, which is not supported.
Instead of
<div <%= @some_attributes %>>
</div>
do
<div {@some_attributes}>
</div>
Where @some_attributes must be a keyword list or a map.
|
73 | <% else %>
74 |
Leider verloren
75 | <% end %>
76 |
| ^
I tried what it suggests but its hard due to the “do:” I have there