mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-20 20:21:33 +03:00
29 lines
640 B
Elm
29 lines
640 B
Elm
module Main exposing (..)
|
|
|
|
import Model exposing (..)
|
|
import Navigation
|
|
import NriModules as NriModules
|
|
import Routes as Routes exposing (Route(..))
|
|
import Update exposing (Msg(..), subscriptions, update)
|
|
import View exposing (view)
|
|
|
|
|
|
main : Program Never Model Msg
|
|
main =
|
|
Navigation.program
|
|
(Routes.fromLocation >> UrlChanged)
|
|
{ init = init
|
|
, update = update
|
|
, subscriptions = subscriptions
|
|
, view = view
|
|
}
|
|
|
|
|
|
init : Navigation.Location -> ( Model, Cmd Msg )
|
|
init location =
|
|
( { route = Routes.fromLocation location
|
|
, moduleStates = NriModules.init
|
|
}
|
|
, Cmd.none
|
|
)
|