mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-02-03 03:14:15 -05:00
22 lines
507 B
Rust
22 lines
507 B
Rust
|
use cfg_if::cfg_if;
|
||
|
pub mod app;
|
||
|
pub mod error_template;
|
||
|
pub mod fileserv;
|
||
|
|
||
|
cfg_if! { if #[cfg(feature = "hydrate")] {
|
||
|
use leptos::*;
|
||
|
use wasm_bindgen::prelude::wasm_bindgen;
|
||
|
use crate::app::*;
|
||
|
|
||
|
#[wasm_bindgen]
|
||
|
pub fn hydrate() {
|
||
|
// initializes logging using the `log` crate
|
||
|
_ = console_log::init_with_level(log::Level::Debug);
|
||
|
console_error_panic_hook::set_once();
|
||
|
|
||
|
leptos::mount_to_body(move |cx| {
|
||
|
view! { cx, <App/> }
|
||
|
});
|
||
|
}
|
||
|
}}
|