create cfg factory

This commit is contained in:
Evan Almloff committed 2023-06-01 13:13:50 -05:00
1 parent 037a248ad9
commit 67992f7da9
6 files changed
+90 -72

No files matched your search

+1 -12
View File
@@ -14,18 +14,7 @@ fn main() {
fn root(cx: Scope) -> Element {
render! {
Router {
config: RouterConfiguration {
history: {
#[cfg(not(target_arch = "wasm32"))]
let history = Box::<MemoryHistory::<Route>>::default();
#[cfg(target_arch = "wasm32")]
let history = Box::<WebHistory::<Route>>::default();
history
},
..Default::default()
}
}
Router {}
}
}