git.iko.soy/typeable/reflex-dom-nested-routing
on master help sign in
Fix parentRouteSegment; add CHANGELOG.md
commitc6eef11eb185b00015022f0af12070b84824cefb author3noch <eacameron@gmail.com> dateSat 18 Nov 2017, 20:30 (9 years ago) parent0c38b37
3 files changed+15−4
CHANGELOG.md+9 Reflex/Dom/NestedRoute.hs+1−3 reflex-dom-nested-routing.cabal+5−1
CHANGELOG.mdnew file+9
@@ -0,0 +1,9 @@
1+# Change Log
2+
3+## 0.0.2
4+
5+ * Fix `parentRouteSegments` which was giving "grandparent" route instead of parent.
6+
7+## 0.0.1
8+
9+ * Initial prototype.
Reflex/Dom/NestedRoute.hs+1−3
@@ -253,9 +253,7 @@ nextRouteSegment = do
253253parentRouteSegments :: (MonadHold t m, MonadFix m, HasRoute t segment m, Eq segment) => m (Dynamic t [segment])
254254parentRouteSegments = do
255255 ctx <- routeContext
256− holdUniqDyn $ do
257− allSegments <- _routeContext_allSegments ctx
258− pure $ take (_routeContext_currentDepth ctx - 1) allSegments
256+ holdUniqDyn $ take (_routeContext_currentDepth ctx) <$> _routeContext_allSegments ctx
259257
260258-- | A simple helper that produces a routing event on 'getPostBuild'.
261259redirectLocally :: (PostBuild t m) => [segment] -> m (Event t [segment])
reflex-dom-nested-routing.cabal+5−1
@@ -1,5 +1,5 @@
11name: reflex-dom-nested-routing
2−version: 0.0.1
2+version: 0.0.2
33synopsis: Nested client-side routing for Reflex-DOM
44description: See README at <https://github.com/3noch/reflex-dom-nested-routing#readme>
55category: Web
@@ -9,6 +9,10 @@ license: BSD3
99license-file: LICENSE
1010build-type: Simple
1111cabal-version: >= 1.10
12+extra-source-files:
13+ CHANGELOG.md
14+ README.md
15+
1216
1317library
1418 hs-source-dirs: .