Merge branch 'master' into intigrate-collect-assets

This commit is contained in:
Evan Almloff committed 2023-09-17 19:40:14 -05:00
1 parent ffb5de91d1
commit f976e08f71
379 files changed
+1962 -13517

No files matched your search

@@ -12,8 +12,9 @@ dioxus-fullstack = { workspace = true }
axum = { version = "0.6.12", optional = true }
serde = "1.0.159"
simple_logger = "4.2.0"
wasm-logger = "0.2.0"
log.workspace = true
tracing-wasm = "0.2.1"
tracing.workspace = true
tracing-subscriber = "0.3.17"
reqwest = "0.11.18"
[features]
@@ -12,7 +12,6 @@ use dioxus_fullstack::{
prelude::*,
};
use serde::{Deserialize, Serialize};
use wasm_logger::Config;
#[derive(Props, PartialEq, Debug, Default, Serialize, Deserialize, Clone)]
struct AppProps {
@@ -66,9 +65,9 @@ async fn get_server_data() -> Result<String, ServerFnError> {
fn main() {
#[cfg(feature = "web")]
wasm_logger::init(wasm_logger::Config::new(log::Level::Trace));
tracing_wasm::set_as_global_default();
#[cfg(feature = "ssr")]
simple_logger::SimpleLogger::new().init().unwrap();
tracing_subscriber::fmt::init();
LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch()
}
@@ -5,8 +5,6 @@
//! cargo run --features ssr --release
//! ```
#![allow(non_snake_case)]
use dioxus::prelude::*;
use dioxus_fullstack::prelude::*;
use dioxus_router::prelude::*;
@@ -33,7 +31,7 @@ enum Route {
Blog { id: i32 },
}
#[inline_props]
#[component]
fn Blog(cx: Scope, id: i32) -> Element {
render! {
Link { to: Route::Home {}, "Go to counter" }
@@ -51,7 +49,7 @@ fn Blog(cx: Scope, id: i32) -> Element {
}
}
#[inline_props]
#[component]
fn Home(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
@@ -16,8 +16,9 @@ salvo = { version = "0.37.9", optional = true }
execute = "0.2.12"
reqwest = "0.11.18"
simple_logger = "4.2.0"
log.workspace = true
wasm-logger = "0.2.0"
tracing-wasm = "0.2.1"
tracing.workspace = true
tracing-subscriber = "0.3.17"
[features]
default = []
@@ -60,9 +60,9 @@ async fn get_server_data() -> Result<String, ServerFnError> {
fn main() {
#[cfg(feature = "web")]
wasm_logger::init(wasm_logger::Config::new(log::Level::Trace));
tracing_wasm::set_as_global_default();
#[cfg(feature = "ssr")]
simple_logger::SimpleLogger::new().init().unwrap();
tracing_subscriber::fmt::init();
LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch()
}
@@ -5,7 +5,7 @@
//! cargo run --features ssr
//! ```
#![allow(non_snake_case, unused)]
#![allow(unused)]
use dioxus::prelude::*;
use dioxus_fullstack::{launch, prelude::*};
use dioxus_router::prelude::*;
@@ -49,7 +49,7 @@ enum Route {
Blog,
}
#[inline_props]
#[component]
fn Blog(cx: Scope) -> Element {
render! {
Link { to: Route::Home {}, "Go to counter" }
@@ -67,7 +67,7 @@ fn Blog(cx: Scope) -> Element {
}
}
#[inline_props]
#[component]
fn Home(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let text = use_state(cx, || "...".to_string());
@@ -16,8 +16,9 @@ warp = { version = "0.3.3", optional = true }
execute = "0.2.12"
reqwest = "0.11.18"
simple_logger = "4.2.0"
log.workspace = true
wasm-logger = "0.2.0"
tracing-wasm = "0.2.1"
tracing.workspace = true
tracing-subscriber = "0.3.17"
[features]
default = []
@@ -60,9 +60,9 @@ async fn get_server_data() -> Result<String, ServerFnError> {
fn main() {
#[cfg(feature = "web")]
wasm_logger::init(wasm_logger::Config::new(log::Level::Trace));
tracing_wasm::set_as_global_default();
#[cfg(feature = "ssr")]
simple_logger::SimpleLogger::new().init().unwrap();
tracing_subscriber::fmt::init();
LaunchBuilder::new_with_props(app, AppProps { count: 0 }).launch()
}