Packages

Improve the UI quality of your product by capturing visual states of LiveView components.

Current section

Files

Jump to
live_capture lib live_capture plugs common_assigns.ex
Raw

lib/live_capture/plugs/common_assigns.ex

defmodule LiveCapture.Plugs.CommonAssigns do
import Phoenix.Component
def on_mount({path, modules}, _params, _session, socket) do
{:cont,
assign(
socket,
component_loaders: modules,
live_capture_path: LiveCapture.Plugs.AssetsConfig.assets_scope(path)
)}
end
end