fix incorrect usage of variables in heex template
This commit is contained in:
parent
f1c22b2cdc
commit
7776cd991a
1 changed files with 2 additions and 1 deletions
|
@ -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 />
|
||||||
|
|
Loading…
Reference in a new issue