link to edit page from list page

This commit is contained in:
Alexander Foremny
2024-06-06 15:31:16 +02:00
parent a569f8d7a2
commit 612da78d17
3 changed files with 23 additions and 7 deletions

View File

@@ -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