mirror of
https://github.com/fly-apps/live_beats.git
synced 2025-01-03 12:28:41 +00:00
Use live_action instead of params
This commit is contained in:
parent
632b211c44
commit
a7c319c035
1 changed files with 3 additions and 3 deletions
|
@ -4,10 +4,10 @@ defmodule LiveBeatsWeb.Nav do
|
||||||
alias LiveBeats.MediaLibrary
|
alias LiveBeats.MediaLibrary
|
||||||
alias LiveBeatsWeb.{ProfileLive, SettingsLive}
|
alias LiveBeatsWeb.{ProfileLive, SettingsLive}
|
||||||
|
|
||||||
def on_mount(:default, params, _session, socket) do
|
def on_mount(:default, _params, _session, socket) do
|
||||||
active_tab =
|
active_tab =
|
||||||
case {socket.view, params} do
|
case {socket.view, socket.assigns.live_action} do
|
||||||
{ProfileLive, %{"profile_username" => _profile}} -> :profile
|
{ProfileLive, _} -> :profile
|
||||||
{SettingsLive, _} -> :settings
|
{SettingsLive, _} -> :settings
|
||||||
{_, _} -> nil
|
{_, _} -> nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue