aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Route.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Route.elm')
-rw-r--r--src/client/elm/Route.elm25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/elm/Route.elm b/src/client/elm/Route.elm
new file mode 100644
index 0000000..dd435a6
--- /dev/null
+++ b/src/client/elm/Route.elm
@@ -0,0 +1,25 @@
+module Route
+ ( Route(..)
+ , matchers
+ , toPath
+ ) where
+
+import Effects exposing (Effects)
+
+import RouteParser exposing (..)
+
+type Route =
+ Home
+ | User
+
+matchers : List (Matcher Route)
+matchers =
+ [ static Home "/"
+ , static User "/user"
+ ]
+
+toPath : Route -> String
+toPath route =
+ case route of
+ Home -> "/"
+ User -> "/user"