From 612da78d17c575cd5ade1de62dc1a3c514129de0 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 6 Jun 2024 15:31:16 +0200 Subject: link to edit page from list page --- frontend/app/Route.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'frontend/app/Route.hs') 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 -- cgit v1.2.3