package reading import scala.scalajs.js.JSApp import rx._ import rx.Ctx.Owner.Unsafe._ import org.scalajs.dom import scalacss.Defaults._ import reading.component.style.{ Global => GlobalStyle } import reading.utils.RxUtils._ object Main extends JSApp { def main(): Unit = { val style = dom.document.createElement("style") style.appendChild(dom.document.createTextNode(GlobalStyle.render)) dom.document.head.appendChild(style) val _ = dom.document.body.appendChild { Rx { Route.current() match { case Route.Books(filters, detail) => component.Index(filters, detail) } }.render } } }