Skip to content

Commit

Permalink
Dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
fidel committed Mar 21, 2024
1 parent df409f4 commit de9eca0
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions ruby_event_store-browser/elm/src/Page/ShowStream.elm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type alias Model =
, relatedStreams : Maybe (List String)
, problems : List Problem
, pagination : Pagination.Specification
, searchStreams : List Api.SearchStream
}


Expand All @@ -38,7 +37,6 @@ initModel flags streamName paginationSpecification =
, flags = flags
, problems = []
, pagination = paginationSpecification
, searchStreams = []
}


Expand All @@ -49,7 +47,6 @@ initModel flags streamName paginationSpecification =
type Msg
= EventsFetched (Result Http.Error (Api.PaginatedList Api.Event))
| StreamFetched (Result Http.Error Api.Stream)
| SearchedStreamsFetched (Result Http.Error (List Api.SearchStream))


initCmd : Flags -> String -> Cmd Msg
Expand Down Expand Up @@ -80,15 +77,9 @@ update msg model =
in
( { model | problems = serverErrors }, Cmd.none )

SearchedStreamsFetched (Ok result) ->
( { model | searchStreams = result }, Cmd.none )

SearchedStreamsFetched (Err _) ->
( model, Cmd.none )


view : Model -> BrowserTime.TimeZone -> ( String, Html Msg )
view { streamName, events, relatedStreams, problems, flags, pagination, searchStreams } selectedTime =
view { streamName, events, relatedStreams, problems, flags, pagination } selectedTime =
let
title =
"Stream " ++ streamName
Expand All @@ -99,7 +90,7 @@ view { streamName, events, relatedStreams, problems, flags, pagination, searchSt
case problems of
[] ->
( title
, browseEvents flags.rootUrl header streamName events relatedStreams selectedTime searchStreams
, browseEvents flags.rootUrl header streamName events relatedStreams selectedTime
)

_ ->
Expand All @@ -115,8 +106,8 @@ view { streamName, events, relatedStreams, problems, flags, pagination, searchSt
)


browseEvents : Url.Url -> String -> String -> Api.PaginatedList Api.Event -> Maybe (List String) -> BrowserTime.TimeZone -> List Api.SearchStream -> Html Msg
browseEvents baseUrl title streamName { links, events } relatedStreams timeZone searchStreams =
browseEvents : Url.Url -> String -> String -> Api.PaginatedList Api.Event -> Maybe (List String) -> BrowserTime.TimeZone -> Html Msg
browseEvents baseUrl title streamName { links, events } relatedStreams timeZone =
div [ class "py-8 container mx-auto" ]
[ div
[ class "flex justify-between" ]
Expand All @@ -127,7 +118,6 @@ browseEvents baseUrl title streamName { links, events } relatedStreams timeZone
]
, div [] [ renderResults baseUrl events timeZone ]
, div [] [ renderRelatedStreams baseUrl relatedStreams ]
, div [ class "bg-red-500" ] [ renderSearchStreams searchStreams ]
]


Expand All @@ -142,12 +132,6 @@ viewProblem problem =
li [] [ text errorMessage ]


renderSearchStreams : List Api.SearchStream -> Html msg
renderSearchStreams searchStreams =
ul []
(List.map (\searchStream -> li [] [ text searchStream.streamId ]) searchStreams)


renderRelatedStreams : Url.Url -> Maybe (List String) -> Html Msg
renderRelatedStreams baseUrl relatedStreams_ =
case relatedStreams_ of
Expand Down

0 comments on commit de9eca0

Please sign in to comment.