aboutsummaryrefslogtreecommitdiff
path: root/src/client/View/Errors.elm
blob: 3e25c9967f4e8172a06b03a9da3459060a84b14c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module View.Errors exposing
  ( view
  )

import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)

import Model.Translations exposing (Translations, getMessage)

view : Translations -> List String -> Html msg
view translations errors =
  ul
    [ class "errors" ]
    ( List.map (errorView translations) errors)

errorView : Translations -> String -> Html msg
errorView translations error =
  li
    [ class "error" ]
    [ text <| getMessage translations error ]