defmodule LabelmakerWeb.Home do use LabelmakerWeb, :live_view alias LabelmakerWeb.Constants alias LabelmakerWeb.Tools def mount(_params, _session, socket) do { :ok, assign( socket, Enum.to_list(%{Constants.defaults() | label: ""}) ) } end def handle_event("update_label", params, socket) do {:noreply, assign(socket, Tools.process_parameters(params))} end def handle_event("make_label", params, socket) do {:noreply, redirect(socket, to: ~p"/#{params["label"]}?#{Map.drop(params, ["label"])}")} end def render(assigns) do ~H"""

Labelmaker

{@label}
""" end end