summaryrefslogtreecommitdiffstats
path: root/src/Routes.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Routes.elm')
-rw-r--r--src/Routes.elm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Routes.elm b/src/Routes.elm
new file mode 100644
index 0000000..04c7eb1
--- /dev/null
+++ b/src/Routes.elm
@@ -0,0 +1,12 @@
+module Routes exposing (..)
+
+import Types exposing (Route(..))
+import Url.Parser exposing ((</>), Parser, oneOf, s, string, top)
+
+
+routeParser : Parser (Route -> a) a
+routeParser =
+ oneOf
+ [ Url.Parser.map Index top
+ , Url.Parser.map Profile (s "profile" </> string)
+ ]