bookmarks!
This commit is contained in:
@ -2,22 +2,23 @@ defmodule SomethingErlangWeb.BookmarksLive.Show do
|
||||
use SomethingErlangWeb, :live_view
|
||||
on_mount SomethingErlangWeb.UserLiveAuth
|
||||
|
||||
#alias SomethingErlang.Grover
|
||||
alias SomethingErlang.Grover
|
||||
|
||||
require Logger
|
||||
|
||||
@impl true
|
||||
def mount(_params, _session, socket) do
|
||||
#Grover.mount(socket.assigns.current_user, id)
|
||||
Grover.mount(socket.assigns.current_user)
|
||||
{:ok, socket}
|
||||
end
|
||||
|
||||
@impl true
|
||||
def handle_params(%{"page" => page}, _, socket) do
|
||||
#thread = Grover.get_thread!(id, page |> String.to_integer())
|
||||
bookmarks = Grover.get_bookmarks!(page |> String.to_integer())
|
||||
{:noreply,
|
||||
socket
|
||||
|> assign(:page_title, "bookmarks")}
|
||||
|> assign(:page_title, "bookmarks")
|
||||
|> assign(:bookmarks, bookmarks)}
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
@ -0,0 +1,16 @@
|
||||
<table class="table w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= for thread <- @bookmarks do %>
|
||||
<tr>
|
||||
<th><%= raw thread.icon %></th>
|
||||
<td><%= raw thread.title %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user