fix incorrect usage of variables in heex template

This commit is contained in:
Inhji 2023-03-09 21:46:07 +01:00
parent f1c22b2cdc
commit 7776cd991a

View file

@ -6,6 +6,7 @@ defmodule ChiyaWeb.NoteShowLive do
@impl true @impl true
def render(assigns) do def render(assigns) do
channels = Enum.map_join(assigns.note.channels, ", ", fn c -> c.name end) channels = Enum.map_join(assigns.note.channels, ", ", fn c -> c.name end)
assigns = assign(assigns, :channels, channels)
~H""" ~H"""
<.header> <.header>
@ -25,7 +26,7 @@ defmodule ChiyaWeb.NoteShowLive do
<:item title="Published at"><%= @note.published_at %></:item> <:item title="Published at"><%= @note.published_at %></:item>
<:item title="Kind"><%= @note.kind %></:item> <:item title="Kind"><%= @note.kind %></:item>
<:item title="Url"><%= @note.url %></:item> <:item title="Url"><%= @note.url %></:item>
<:item title="Channels"><%= channels %></:item> <:item title="Channels"><%= @channels %></:item>
</.list> </.list>
<.line /> <.line />