web: use a more point-free style
@@ -463,23 +463,19 @@ update msg ( model, effects ) =
( newModel, effects )
Click TriggerBuildButton ->
- case currentJob model of
- Nothing ->
+ (currentJob model
+ |> Maybe.map (DoTriggerBuild >> (::) >> Tuple.mapSecond)
+ |> Maybe.withDefault identity
+ )
( model, effects )
- Just someJob ->
- ( model, effects ++ [ DoTriggerBuild someJob ] )
-
Click AbortBuildButton ->
- case
- model.currentBuild
+ (model.currentBuild
|> RemoteData.toMaybe
- |> Maybe.map (.build >> .id)
- of
- Just buildId ->
- ( model, effects ++ [ DoAbortBuild buildId ] )
-
- _ ->
+ |> Maybe.map
+ (.build >> .id >> DoAbortBuild >> (::) >> Tuple.mapSecond)
+ |> Maybe.withDefault identity
+ )
( model, effects )
Click (StepHeader id) ->
