Adjust error message

This commit is contained in:
Tessa Kelly 2020-09-09 12:07:07 -07:00
parent 819aee116d
commit 49f9880181

View File

@ -166,19 +166,18 @@ view_ model =
, Html.main_ [ css [ flexGrow (int 1), sectionStyles ] ]
(case model.route of
Routes.Doodad doodad ->
case List.head (examples (\m -> m.name == doodad)) of
Just example ->
[ mainContentHeader ("Viewing " ++ doodad ++ " doodad only")
, examples (\m -> m.name == doodad)
|> List.head
|> Maybe.map
(\example ->
Html.div [ id (String.replace "." "-" example.name) ]
, Html.div [ id (String.replace "." "-" example.name) ]
[ Example.view example
|> Html.map (UpdateModuleStates example.name)
]
)
|> Maybe.withDefault (Html.text "Oops! We couldn't find that doodad.")
]
Nothing ->
[ Html.text <| "Oops! We couldn't find " ++ doodad ]
Routes.Category category ->
[ mainContentHeader (Category.forDisplay category)
, examples