summaryrefslogtreecommitdiffstats
path: root/src/Types.elm
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2021-10-30 19:24:00 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2021-10-30 19:29:03 +0300
commitc6d55561bf8422301ea7a2d08b9a7c3e30a1440e (patch)
tree33fd6b0c1150b67e2f8ba38806a984c3cecccc75 /src/Types.elm
parente24ba80820bd49af72a9e1702ed635e9b63452d1 (diff)
Implement authentication
Diffstat (limited to 'src/Types.elm')
-rw-r--r--src/Types.elm16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Types.elm b/src/Types.elm
index ce487b6..d5068d6 100644
--- a/src/Types.elm
+++ b/src/Types.elm
@@ -1,13 +1,24 @@
module Types exposing (..)
+import Browser.Navigation exposing (Key)
import Http
+import RemoteData exposing (RemoteData)
import Time
type alias Model =
- { posts : Maybe (List Post)
+ { now : Time.Posix
+ , key : Key
+ , userData : UserData
+ , posts : RemoteData (List Post)
, composeInputValue : String
- , now : Time.Posix
+ }
+
+
+type alias UserData =
+ { name : String
+ , email : String
+ , pictureUrl : String
}
@@ -39,4 +50,5 @@ type alias Post =
, author : Author
, createdAt : Time.Posix
, likes : Int
+ , userPictureUrl : String
}