defmodule LivebookWeb.SessionLive.ExportComponent do use LivebookWeb, :live_component alias Livebook.Session @impl true def update(assigns, socket) do {any_stale_cell?, assigns} = Map.pop!(assigns, :any_stale_cell?) socket = assign(socket, assigns) {:ok, socket # Note: we need to load the notebook, because the local data # has cell contents stripped out |> assign_new(:notebook, fn -> Session.get_notebook(socket.assigns.session.pid) end) |> assign_new(:any_stale_cell?, fn -> any_stale_cell? end)} end @impl true def render(assigns) do ~H"""
Here you can preview and directly export the notebook source.