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, 5 insertions, 1 deletions
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