From c6d55561bf8422301ea7a2d08b9a7c3e30a1440e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 30 Oct 2021 19:24:00 +0300 Subject: Implement authentication --- src/Types.elm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/Types.elm') 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 } -- cgit v1.3