mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-12-22 07:06:31 +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 LiveBeatsWeb.{ProfileLive, SettingsLive}
|
||||
|
||||
def on_mount(:default, params, _session, socket) do
|
||||
def on_mount(:default, _params, _session, socket) do
|
||||
active_tab =
|
||||
case {socket.view, params} do
|
||||
{ProfileLive, %{"profile_username" => _profile}} -> :profile
|
||||
case {socket.view, socket.assigns.live_action} do
|
||||
{ProfileLive, _} -> :profile
|
||||
{SettingsLive, _} -> :settings
|
||||
{_, _} -> nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue