defmodule LivebookWeb.JSViewComponent do
use LivebookWeb, :live_component
@impl true
def update(assigns, socket) do
{:ok,
socket
|> assign(assigns)
|> assign_new(:timeout_message, fn -> "Not available" end)}
end
@impl true
def render(assigns) do
~H"""
"""
end
defp session_token(session_id, client_id) do
Phoenix.Token.sign(LivebookWeb.Endpoint, "session", %{
session_id: session_id,
client_id: client_id
})
end
defp connect_token(pid) do
Phoenix.Token.sign(LivebookWeb.Endpoint, "js-view-connect", %{pid: pid})
end
end