Reorganize part9 and part10 a bit.
This commit is contained in:
@@ -53,6 +53,16 @@ initialModel =
|
||||
}
|
||||
|
||||
|
||||
init : ( Model, Cmd Msg )
|
||||
init =
|
||||
( initialModel, githubSearch (getQueryString initialModel.query) )
|
||||
|
||||
|
||||
subscriptions : Model -> Sub Msg
|
||||
subscriptions _ =
|
||||
githubResponse decodeResponse
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
div [ class "content" ]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
module Main exposing (..)
|
||||
module Main exposing (main)
|
||||
|
||||
import ElmHub exposing (..)
|
||||
import ElmHub
|
||||
import Html.App as Html
|
||||
|
||||
|
||||
main : Program Never
|
||||
main =
|
||||
Html.program
|
||||
{ view = view
|
||||
, update = update
|
||||
, init = ( initialModel, githubSearch (getQueryString initialModel.query) )
|
||||
, subscriptions = \_ -> githubResponse decodeResponse
|
||||
{ view = ElmHub.view
|
||||
, update = ElmHub.update
|
||||
, init = ElmHub.init
|
||||
, subscriptions = ElmHub.subscriptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user