Map events refactoring (#41)

* refactor(Map): Map event handling refactoring
This commit is contained in:
Dmitry Popov
2024-11-01 14:54:34 +04:00
committed by GitHub
parent 49c0cb026b
commit 696c7d2cd1
19 changed files with 2337 additions and 2115 deletions

View File

@@ -12,6 +12,7 @@ defmodule WandererAppWeb.MapPicker do
{:ok, socket}
end
@impl true
def update(
%{
current_user: current_user,
@@ -29,6 +30,7 @@ defmodule WandererAppWeb.MapPicker do
end)}
end
@impl true
def render(assigns) do
~H"""
<div id={@id}>
@@ -56,6 +58,7 @@ defmodule WandererAppWeb.MapPicker do
"""
end
@impl true
def handle_event("select", %{"map_slug" => map_slug} = _params, socket) do
notify_to(socket.assigns.notify_to, socket.assigns.event_name, map_slug)