defmodule LivebookWeb.SettingsLive.EnvVarsComponent do
use LivebookWeb, :live_component
alias Livebook.Settings
@impl true
def render(assigns) do
~H"""
"""
end
@impl true
def handle_event("edit_env_var", %{"env_var" => key}, socket) do
{:noreply, push_patch(socket, to: Routes.settings_path(socket, :edit_env_var, key))}
end
def handle_event("delete_env_var", %{"env_var" => key}, socket) do
Settings.delete_env_var(key)
{:noreply, socket}
end
end