Browse Source

chore: clean up

main
Inhji Y. 4 months ago
parent
commit
3f57396c30
  1. 6
      lib/mirage_web/live/goto_anything_live.ex

6
lib/mirage_web/live/goto_anything_live.ex

@ -8,18 +8,16 @@ defmodule MirageWeb.GotoAnythingLive do
@impl true
def handle_event("hotkey", %{"key" => "p", "ctrlKey" => true}, socket) do
IO.inspect("Open Popup")
{:noreply, socket |> assign(%{popup_class: "open"})}
end
@impl true
def handle_event("hotkey", %{"key" => "Escape", "ctrlKey" => false}, socket) do
IO.inspect("Close Popup")
{:noreply, socket |> assign(%{popup_class: "closed"})}
end
@impl true
def handle_event("hotkey", params, socket) do
def handle_event("hotkey", _params, socket) do
{:noreply, socket}
end
@ -31,8 +29,6 @@ defmodule MirageWeb.GotoAnythingLive do
if not Enum.empty?(results) do
note = List.first(results)
IO.inspect("Redirecting to #{note.title}")
push_redirect(socket, to: Routes.show_note_path(@socket, :show, note))
else
socket

Loading…
Cancel
Save