module View
( view
) where
import Html exposing (..)
import Signal exposing (Address)
import Model exposing (Model)
import Model.Action exposing (Action)
import Model.View exposing (..)
import View.Header exposing (renderHeader)
import View.Loading exposing (renderLoading)
import View.SignIn exposing (renderSignIn)
import View.LoggedIn exposing (renderLoggedIn)
view : Address Action -> Model -> Html
view address model =
div
[]
[ renderHeader address model
, renderMain address model
]
renderMain : Address Action -> Model -> Html
renderMain address model =
case model.view of
LoadingView ->
renderLoading address
SignInView signInView ->
renderSignIn address model signInView
LoggedInView loggedInView ->
renderLoggedIn address model loggedInView