-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(elm): Basic user profile page (#64)
- Loading branch information
Showing
5 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ type Route | |
| RoomListRoute | ||
| RoomRoute RoomId | ||
| PanelRoute | ||
| UserRoute | ||
| NotFoundRoute | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module User.View exposing (..) | ||
|
||
import General.Models exposing (Model) | ||
import Html exposing (..) | ||
import Msgs exposing (Msg(..)) | ||
import RemoteData | ||
|
||
|
||
userView : Model -> Html Msg | ||
userView model = | ||
case model.user of | ||
RemoteData.Success user -> | ||
div [] | ||
[ h3 [] [ text ("Username: " ++ user.name) ] | ||
, h3 [] [ text ("Email: " ++ user.email) ] | ||
] | ||
|
||
RemoteData.NotAsked -> | ||
text "" | ||
|
||
RemoteData.Loading -> | ||
text "Loading..." | ||
|
||
RemoteData.Failure error -> | ||
text (toString error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters