aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/app/Route.hs
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/Route.hs')
-rw-r--r--frontend/app/Route.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontend/app/Route.hs b/frontend/app/Route.hs
index 18a3273..546939c 100644
--- a/frontend/app/Route.hs
+++ b/frontend/app/Route.hs
@@ -1,6 +1,7 @@
module Route
( Route (..),
parseURI,
+ routeToString,
)
where
@@ -32,3 +33,8 @@ parseURI uri =
<* P.endOfInput
)
(T.pack uri.uriFragment)
+
+routeToString :: Route -> String
+routeToString Home = "#"
+routeToString (ListCollection collection) = "#collection/" <> collection
+routeToString (EditValue collection fileName) = "#collection/" <> collection <> "/" <> fileName