Update logout button.

This commit is contained in:
Dillon Kearns 2022-08-09 06:39:16 -07:00
parent 517acbce9d
commit d594cdcc60

View File

@ -165,11 +165,11 @@ view maybeUrl sharedModel model static =
, Html.text <| "Hello " ++ static.data.username ++ "!" , Html.text <| "Hello " ++ static.data.username ++ "!"
, Html.text <| "Requested page at " ++ String.fromInt (Time.posixToMillis static.data.requestTime) , Html.text <| "Requested page at " ++ String.fromInt (Time.posixToMillis static.data.requestTime)
, Html.div [] , Html.div []
[ Html.form [ Attr.method "post", Attr.action "/logout", onSubmit (Logout |> Pages.Msg.UserMsg) ] [ Html.form
[ Html.button -- TODO use client-side form submission
[ Attr.type_ "submit" ] -- TODO should there be a helper function to easily invoke a form submission to a different route?
[ Html.text "Logout" ] [ Attr.method "post", Attr.action "/logout" ]
] [ Html.button [] [ Html.text "Logout" ] ]
] ]
] ]
} }