mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-25 06:33:09 +03:00
get navigation messages in order
This commit is contained in:
parent
fa5f4ddbcd
commit
63e47f4cc8
@ -1,7 +1,7 @@
|
|||||||
module Update exposing (Msg(..), subscriptions, update)
|
module Update exposing (Msg(..), subscriptions, update)
|
||||||
|
|
||||||
import Browser exposing (UrlRequest(..))
|
import Browser exposing (UrlRequest(..))
|
||||||
import Browser.Navigation exposing (pushUrl)
|
import Browser.Navigation
|
||||||
import Model exposing (..)
|
import Model exposing (..)
|
||||||
import NriModules as NriModules
|
import NriModules as NriModules
|
||||||
import Routes
|
import Routes
|
||||||
@ -30,14 +30,13 @@ update action model =
|
|||||||
OnUrlRequest request ->
|
OnUrlRequest request ->
|
||||||
case request of
|
case request of
|
||||||
Internal loc ->
|
Internal loc ->
|
||||||
( { model | route = Routes.fromLocation loc }, pushUrl model.navigationKey (Url.toString loc) )
|
( model, Browser.Navigation.pushUrl model.navigationKey (Url.toString loc) )
|
||||||
|
|
||||||
External loc ->
|
External loc ->
|
||||||
( model, pushUrl model.navigationKey loc )
|
( model, Browser.Navigation.load loc )
|
||||||
|
|
||||||
OnUrlChange route ->
|
OnUrlChange route ->
|
||||||
-- TODO
|
( { model | route = Routes.fromLocation route }, Cmd.none )
|
||||||
( model, Cmd.none )
|
|
||||||
|
|
||||||
NoOp ->
|
NoOp ->
|
||||||
( model, Cmd.none )
|
( model, Cmd.none )
|
||||||
|
Loading…
Reference in New Issue
Block a user