blob: a1fa3f0692300da8df2aef354af357fd3e17236b (
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
|
module LoggedIn.View exposing
( view
)
import Html exposing (..)
import Html.Attributes exposing (..)
import Page
import Msg exposing (Msg)
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 Msg
view model loggedIn =
div
[ class "loggedIn" ]
[ let loggedData = LoggedData.build model loggedIn
in case model.page of
Page.Home -> HomeView.view loggedData loggedIn.home
Page.Income -> UserView.view loggedData loggedIn.income
Page.Statistics -> StatView.view loggedData
]
|