pub mod app;
pub mod pages {
    pub mod edit_wall;
    pub mod routes;
    pub mod wall;
}
pub mod components {
    pub mod button;
    pub mod header;
}

pub mod codec;

#[cfg(feature = "ssr")]
pub mod server;

pub mod models;

#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
    use crate::app::*;

    console_error_panic_hook::set_once();

    tracing_subscriber::fmt()
        .with_writer(
            // To avoide trace events in the browser from showing their JS backtrace
            tracing_subscriber_wasm::MakeConsoleWriter::default().map_trace_level_to(tracing::Level::DEBUG),
        )
        // For some reason, if we don't do this in the browser, we get a runtime error.
        .without_time()
        .with_ansi(false)
        .init();

    leptos::mount::hydrate_body(App);
}
