about summary refs log tree commit diff
path: root/client/src/State.elm
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/State.elm')
-rw-r--r--client/src/State.elm11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/State.elm b/client/src/State.elm
index d3db7ddf2967..a8970df24d03 100644
--- a/client/src/State.elm
+++ b/client/src/State.elm
@@ -1,4 +1,4 @@
-module State exposing (..)
+port module State exposing (..)
 
 import Array exposing (Array)
 import Browser
@@ -39,6 +39,7 @@ type Msg
     | UpdateTripComment String
     | ClearErrors
     | ToggleLoginForm
+    | PrintPage
       -- SPA
     | LinkClicked Browser.UrlRequest
     | UrlChanged Url.Url
@@ -476,11 +477,14 @@ userHome flags url key =
     )
 
 
+port printPage : () -> Cmd msg
+
+
 {-| The initial state for the application.
 -}
 init : () -> Url.Url -> Nav.Key -> ( Model, Cmd Msg )
 init flags url key =
-    prod flags url key
+    userHome flags url key
 
 
 {-| Now that we have state, we need a function to change the state.
@@ -591,6 +595,9 @@ update msg model =
             , Cmd.none
             )
 
+        PrintPage ->
+            ( model, printPage () )
+
         LinkClicked urlRequest ->
             case urlRequest of
                 Browser.Internal url ->