aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/View/Page.elm
blob: 763734ddc42e6167b1a5294c461eb6a35510c41e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module View.Page
  ( renderPage
  ) where

import Html exposing (..)

import Model exposing (Model)
import Model.View exposing (..)

import View.Header exposing (renderHeader)
import View.Loading exposing (renderLoading)
import View.SignIn exposing (renderSignIn)
import View.LoggedIn exposing (renderLoggedIn)

renderPage : Model -> Html
renderPage model =
  div
    []
    [ renderHeader model
    , renderMain model
    ]

renderMain : Model -> Html
renderMain model =
  case model.view of
    LoadingView ->
      renderLoading
    SignInView signInView ->
      renderSignIn model signInView
    LoggedInView loggedInView ->
      renderLoggedIn model loggedInView