add edit page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user