diff --git a/src/elm/Layouts/Default.elm b/src/elm/Layouts/Default.elm index 2c298069a..a52138883 100644 --- a/src/elm/Layouts/Default.elm +++ b/src/elm/Layouts/Default.elm @@ -42,6 +42,7 @@ layout props shared route = , view = view props shared route , subscriptions = subscriptions } + |> Layout.withOnUrlChanged OnUrlChanged @@ -75,6 +76,8 @@ init shared _ = -} type Msg = NoOp + -- BROWSER + | OnUrlChanged { from : Route (), to : Route () } -- HEADER | ShowHideIdentity (Maybe Bool) | ShowHideHelp (Maybe Bool) @@ -95,6 +98,12 @@ update msg model = , Effect.none ) + -- BROWSER + OnUrlChanged _ -> + ( model + , Effect.updateFavicon { favicon = Favicons.defaultFavicon } + ) + -- HEADER ShowHideIdentity show -> ( { model diff --git a/src/elm/Pages/Dashboards/Dashboard_.elm b/src/elm/Pages/Dashboards/Dashboard_.elm index 78eb11b69..4d32587e3 100644 --- a/src/elm/Pages/Dashboards/Dashboard_.elm +++ b/src/elm/Pages/Dashboards/Dashboard_.elm @@ -112,15 +112,12 @@ type alias Model = init : Shared.Model -> Route { dashboard : String } -> () -> ( Model, Effect Msg ) init shared route () = ( { dashboard = RemoteData.Loading } - , Effect.batch - [ Effect.updateFavicon { favicon = Favicons.defaultFavicon } - , Effect.getDashboard - { baseUrl = shared.velaAPIBaseURL - , session = shared.session - , onResponse = GetDashboardResponse - , dashboardId = route.params.dashboard - } - ] + , Effect.getDashboard + { baseUrl = shared.velaAPIBaseURL + , session = shared.session + , onResponse = GetDashboardResponse + , dashboardId = route.params.dashboard + } )