Extract viewAll

This commit is contained in:
Tessa Kelly 2022-03-30 11:15:58 -07:00
parent b54e44b76c
commit c41eab81e8

View File

@ -197,10 +197,7 @@ view_ model =
viewCategory model category
Routes.All ->
withSideNav model.route
[ mainContentHeader "All"
, viewPreviews "all" (examples (\_ -> True))
]
viewAll model
viewExample : Model -> Example a msg -> Html msg
@ -220,6 +217,14 @@ notFound =
}
viewAll : Model -> Html Msg
viewAll model =
withSideNav model.route
[ mainContentHeader "All"
, viewPreviews "all" (Dict.values model.moduleStates)
]
viewCategory : Model -> Category -> Html Msg
viewCategory model category =
withSideNav model.route