feat: add cuddle leptos

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-09-07 22:08:35 +02:00
parent 7688d45cc1
commit c13631cf7f
26 changed files with 3345 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
[package]
name = "frontend"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
app = { path = "../app", default-features = false, features = ["hydrate"] }
leptos = { workspace = true, features = [ "hydrate" ] }
console_error_panic_hook.workspace = true
console_log.workspace = true
log.workspace = true
wasm-bindgen.workspace = true

View File

@@ -0,0 +1,12 @@
use app::*;
use leptos::*;
use wasm_bindgen::prelude::wasm_bindgen;
#[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(App);
}