Browse Source

fix: improve inbox notes

main
Inhji Y. 3 months ago
parent
commit
2fc09aa522
  1. 10
      lib/mirage_web/live/inbox_live/item_component.ex

10
lib/mirage_web/live/inbox_live/item_component.ex

@ -1,6 +1,5 @@
defmodule MirageWeb.InboxLive.ItemComponent do
use Phoenix.LiveComponent
use MirageWeb, :live_view
use MirageWeb, :live_component
def render(assigns) do
~L"""
@ -10,6 +9,13 @@ defmodule MirageWeb.InboxLive.ItemComponent do
</span>
<span>
<strong><%= @note.title %></strong>
<p><%= @note.content |> String.slice(0..50) %>..</p>
<p class="tags">
<span class="tag">Views: <%= @note.views %></span>
<%= for topic <- @note.topics do %>
<span class="tag"><%= topic.text %></span>
<% end %>
</p>
</span>
<% end %>
"""

Loading…
Cancel
Save