Skip to content

Commit

Permalink
refactor: use warning instead of blocking error
Browse files Browse the repository at this point in the history
  • Loading branch information
n1k0 committed Jan 8, 2025
1 parent 6b09321 commit b714b0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Views/Alert.elm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type Level
= Danger
| Info
| Success
| Warning


icon : Level -> Html msg
Expand All @@ -40,6 +41,9 @@ icon level =
Success ->
span [ class "me-1" ] [ Icon.checkCircle ]

Warning ->
span [ class "me-1" ] [ Icon.warning ]


httpError : Http.Error -> Html msg
httpError error =
Expand Down Expand Up @@ -125,3 +129,6 @@ levelToClass level =

Success ->
"success"

Warning ->
"warning"
2 changes: 1 addition & 1 deletion src/Views/Page.elm
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ notificationView { closeNotification } notification =

Session.StoreDecodingError decodeError ->
Alert.simple
{ level = Alert.Danger
{ level = Alert.Warning
, title = Just "Erreur de récupération de session"
, close = Nothing
, content =
Expand Down

0 comments on commit b714b0c

Please sign in to comment.