web: structure: remove unnecessary pattern match
The welcome card only gets displayed when the browser has successfully retrieved
a list of pipelines _and_ that list is empty!
@@ -842,11 +842,15 @@ dashboardView session model =
:: onScroll Scrolled
:: Styles.content model.highDensity
)
- (if model.pipelines == Nothing then
+ (case model.pipelines of
+ Nothing ->
[ loadingView ]
- else
- welcomeCard session model :: pipelinesView session model
+ Just [] ->
+ welcomeCard session :: pipelinesView session model
+
+ Just _ ->
+ pipelinesView session model
)
@@ -859,9 +863,8 @@ loadingView =
welcomeCard :
{ a | hovered : HoverState.HoverState, userState : UserState.UserState }
- -> { b | pipelines : Maybe (List Pipeline) }
-> Html Message
-welcomeCard session { pipelines } =
+welcomeCard session =
let
cliIcon : HoverState.HoverState -> Cli.Cli -> Html Message
cliIcon hoverable cli =
@@ -882,11 +885,7 @@ welcomeCard session { pipelines } =
}
)
[]
-
- noPipelines =
- pipelines |> Maybe.map List.isEmpty |> Maybe.withDefault False
in
- if noPipelines then
Html.div
(id "welcome-card" :: Styles.welcomeCard)
[ Html.div
@@ -915,9 +914,6 @@ welcomeCard session { pipelines } =
[ Html.text Text.asciiArt ]
]
- else
- Html.text ""
-
loginInstruction : UserState.UserState -> List (Html Message)
loginInstruction userState =
