StatisticsLive: load statistics only in handle_params
This commit is contained in:
parent
004336fea3
commit
f08c5d59f3
1 changed files with 1 additions and 1 deletions
|
|
@ -15,12 +15,12 @@ defmodule MvWeb.StatisticsLive do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def mount(_params, _session, socket) do
|
def mount(_params, _session, socket) do
|
||||||
|
# Only static assigns and fee types here; load_statistics runs once in handle_params
|
||||||
socket =
|
socket =
|
||||||
socket
|
socket
|
||||||
|> assign(:page_title, gettext("Statistics"))
|
|> assign(:page_title, gettext("Statistics"))
|
||||||
|> assign(:selected_fee_type_id, nil)
|
|> assign(:selected_fee_type_id, nil)
|
||||||
|> load_fee_types()
|
|> load_fee_types()
|
||||||
|> load_statistics()
|
|
||||||
|
|
||||||
{:ok, socket}
|
{:ok, socket}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue