Open
Description
I have a route like this
myRoute =
root *> oneOf
[ RegionRoute <$> (lit "region" *> regionMatcher)
]
data Region = West | East
regionMatcher :: Match Region
When using Routing.PushState.matches
, /region/west
will match, but /region/west#hash
will fail. I understand my regionMatcher
failed to parse west#hash
as Region
.
I ended up dropping the hash before hand.
myMatch = matchesWith <<< matchWith (unsafeDecodeURIComponent <<< String.takeWhile (_ /= String.codePointFromChar '#'))
Wondering is there a better way to handle this?
Metadata
Metadata
Assignees
Labels
No labels