Don't make elmHubHeader top-level

This commit is contained in:
Richard Feldman
2017-10-27 12:44:18 +02:00
parent b964fb9a6d
commit 8610d9f42f
2 changed files with 15 additions and 16 deletions

View File

@@ -32,14 +32,14 @@ initialModel =
}
elmHubHeader =
view model =
let
elmHubHeader =
header []
[ h1 [] [ text "ElmHub" ]
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
]
view model =
in
div [ class "content" ]
[ elmHubHeader
, ul [ class "results" ] (List.map viewSearchResult model.results)

View File

@@ -27,6 +27,7 @@ type alias Msg =
{-| TODO add a type annotation to this value
HINT: The type aliases above may come in handy for these exercises!
-}
initialModel =
{ query = "tutorial"
@@ -55,18 +56,16 @@ initialModel =
}
{-| TODO add a type annotation to this value
{-| TODO add a type annotation to this function
-}
elmHubHeader =
view model =
let
elmHubHeader =
header []
[ h1 [] [ text "ElmHub" ]
, span [ class "tagline" ] [ text "Like GitHub, but for Elm things." ]
]
{-| TODO add a type annotation to this function
-}
view model =
in
div [ class "content" ]
[ elmHubHeader
, ul [ class "results" ] (List.map viewSearchResult model.results)