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

+7 -7
View File
@@ -36,14 +36,14 @@ enum Route {
// ANCHOR_END: router
#[component]
fn App(cx: Scope) -> Element {
fn App() -> Element {
render! {
Router::<Route> {}
}
}
#[component]
fn NavBar(cx: Scope) -> Element {
fn NavBar() -> Element {
render! {
nav {
ul {
@@ -56,14 +56,14 @@ fn NavBar(cx: Scope) -> Element {
}
#[component]
fn Home(cx: Scope) -> Element {
fn Home() -> Element {
render! {
h1 { "Welcome to the Dioxus Blog!" }
}
}
#[component]
fn Blog(cx: Scope) -> Element {
fn Blog() -> Element {
render! {
h1 { "Blog" }
Outlet::<Route> {}
@@ -71,7 +71,7 @@ fn Blog(cx: Scope) -> Element {
}
#[component]
fn BlogList(cx: Scope) -> Element {
fn BlogList() -> Element {
render! {
h2 { "Choose a post" }
ul {
@@ -92,14 +92,14 @@ fn BlogList(cx: Scope) -> Element {
}
#[component]
fn BlogPost(cx: Scope, name: String) -> Element {
fn BlogPost(name: String) -> Element {
render! {
h2 { "Blog Post: {name}"}
}
}
#[component]
fn PageNotFound(cx: Scope, route: Vec<String>) -> Element {
fn PageNotFound(route: Vec<String>) -> Element {
render! {
h1 { "Page not found" }
p { "We are terribly sorry, but the page you requested doesn't exist." }