mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-25 22:53:34 +03:00
Adjust error message
This commit is contained in:
parent
819aee116d
commit
49f9880181
@ -166,19 +166,18 @@ view_ model =
|
|||||||
, Html.main_ [ css [ flexGrow (int 1), sectionStyles ] ]
|
, Html.main_ [ css [ flexGrow (int 1), sectionStyles ] ]
|
||||||
(case model.route of
|
(case model.route of
|
||||||
Routes.Doodad doodad ->
|
Routes.Doodad doodad ->
|
||||||
|
case List.head (examples (\m -> m.name == doodad)) of
|
||||||
|
Just example ->
|
||||||
[ mainContentHeader ("Viewing " ++ doodad ++ " doodad only")
|
[ mainContentHeader ("Viewing " ++ doodad ++ " doodad only")
|
||||||
, examples (\m -> m.name == doodad)
|
, Html.div [ id (String.replace "." "-" example.name) ]
|
||||||
|> List.head
|
|
||||||
|> Maybe.map
|
|
||||||
(\example ->
|
|
||||||
Html.div [ id (String.replace "." "-" example.name) ]
|
|
||||||
[ Example.view example
|
[ Example.view example
|
||||||
|> Html.map (UpdateModuleStates example.name)
|
|> 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 ->
|
Routes.Category category ->
|
||||||
[ mainContentHeader (Category.forDisplay category)
|
[ mainContentHeader (Category.forDisplay category)
|
||||||
, examples
|
, examples
|
||||||
|
Loading…
Reference in New Issue
Block a user