Fix router url handling for child routers

This commit is contained in:
Zak Patterson 2019-02-11 17:20:06 -05:00
parent 56e28d8c1d
commit fe08dd3915
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ final case class RouterState[P](page: P)
class AppRouter[F[_]: LiftIO, P](root: Path, f: Path => P) {
def routerReducer(state: RouterState[P], action: Action): RouterState[P] = action match {
case Replace(path) =>
Path.unapplySeq(Path(root, path)).foreach(p => window.history.replaceState("", "", p.mkString("/")))
window.history.replaceState("", "", Path(root, path).toString)
state.copy(page = f(path))
case _ => state
}

View File

@ -1,4 +1,4 @@
object Version{
val version = "0.0.3"
val version = "0.0.4"
val scalaVersion = "2.12.8"
}