From a7a4dd01127506dba991cc5f3f39c4a370fff699 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 5 Jun 2024 10:41:02 +0200 Subject: add edit page --- frontend/app/Route.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'frontend/app/Route.hs') diff --git a/frontend/app/Route.hs b/frontend/app/Route.hs index 36e1462..18a3273 100644 --- a/frontend/app/Route.hs +++ b/frontend/app/Route.hs @@ -12,6 +12,7 @@ import Miso data Route = Home | ListCollection String + | EditValue String String deriving (Show, Eq) instance Default Route where @@ -22,7 +23,10 @@ parseURI uri = either (const def) id $ P.parseOnly ( P.choice - [ ListCollection <$> (P.string "#collection/" *> P.many1 P.anyChar), + [ EditValue + <$> (P.string "#collection/" *> P.manyTill P.anyChar (P.string "/")) + <*> (P.many1 P.anyChar), + ListCollection <$> (P.string "#collection/" *> P.many1 P.anyChar), pure Home ] <* P.endOfInput -- cgit v1.2.3