blob: dbbab333e7496d78a3b5638aa26f64ab29f25d80 (
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 LoggedIn.View
( view
) where
import Html exposing (..)
import Html.Attributes exposing (..)
import TransitRouter
import Route exposing (..)
import Action exposing (Action)
import Model exposing (Model)
import LoggedData
import LoggedIn.Model as LoggedInModel
import LoggedIn.Home.View as HomeView
import LoggedIn.Income.View as UserView
import LoggedIn.Stat.View as StatView
view : Model -> LoggedInModel.Model -> Html
view model loggedIn =
div
[ class "loggedIn" ]
[ let loggedData = LoggedData.build model loggedIn
in case TransitRouter.getRoute model of
Empty -> text ""
Home -> HomeView.view loggedData loggedIn.home
Income -> UserView.view loggedData loggedIn.income
Stat -> StatView.view loggedData
]
|