feat: Improve handling of association name config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
605a897045
commit
2443bc62ac
9 changed files with 179 additions and 4 deletions
|
|
@ -135,8 +135,11 @@ defmodule MvWeb.Layouts do
|
|||
slot :inner_block, required: true
|
||||
|
||||
def app(assigns) do
|
||||
# Single get_settings() for layout; derive club_name and join_form_enabled to avoid duplicate query.
|
||||
%{club_name: club_name, join_form_enabled: join_form_enabled} = get_layout_settings()
|
||||
# Single settings read for layout defaults.
|
||||
# Use an explicitly provided club_name as source of truth to avoid stale
|
||||
# values from cache reads immediately after a settings update in LiveViews.
|
||||
%{club_name: fallback_club_name, join_form_enabled: join_form_enabled} = get_layout_settings()
|
||||
club_name = assigns[:club_name] || fallback_club_name
|
||||
|
||||
# NOTE: Unprocessed count runs on every page load when join form is enabled; consider
|
||||
# loading only on navigation or caching briefly if performance becomes an issue.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue