Fix the router and stub out a number of crates to get compiling

This commit is contained in:
Jonathan Kelley committed 2024-01-13 20:51:37 -08:00
1 parent 4c6e515da4
commit fae0b08e61
226 files changed
+1057 -1482

No files matched your search

+2 -2
View File
@@ -71,7 +71,7 @@ fn write_callbody_with_icon_section(mut callbody: CallBody) -> String {
}
fn write_component_body(raw: String) -> String {
let mut out = String::from("fn component(cx: Scope) -> Element {\n cx.render(rsx! {");
let mut out = String::from("fn component() -> Element {\n cx.render(rsx! {");
indent_and_write(&raw, 1, &mut out);
out.push_str(" })\n}");
out
@@ -84,7 +84,7 @@ fn write_svg_section(out: &mut String, svgs: Vec<BodyNode>) {
let raw = dioxus_autofmt::write_block_out(CallBody { roots: vec![icon] }).unwrap();
out.push_str("\n\n pub fn icon_");
out.push_str(&idx.to_string());
out.push_str("(cx: Scope) -> Element {\n cx.render(rsx! {");
out.push_str("() -> Element {\n cx.render(rsx! {");
indent_and_write(&raw, 2, out);
out.push_str(" })\n }");
}
+2 -2
View File
@@ -36,7 +36,7 @@ async fn setup_file_watcher<F: Fn() -> Result<BuildResult> + Send + 'static>(
if let Some(hot_reload) = &hot_reload {
// find changes to the rsx in the file
let mut rsx_file_map = hot_reload.file_map.lock().unwrap();
let mut messages: Vec<Template<'static>> = Vec::new();
let mut messages: Vec<Template> = Vec::new();
// In hot reload mode, we only need to rebuild if non-rsx code is changed
needs_full_rebuild = false;
@@ -143,6 +143,6 @@ pub(crate) trait Platform {
#[derive(Clone)]
pub struct HotReloadState {
pub messages: broadcast::Sender<Template<'static>>,
pub messages: broadcast::Sender<Template>,
pub file_map: Arc<Mutex<FileMap<HtmlCtx>>>,
}