All checks were successful
Push Workflows / rustfmt (push) Successful in 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / test (push) Successful in 17s
Push Workflows / docs (push) Successful in 17s
Push Workflows / clippy (push) Successful in 15s
Push Workflows / build (push) Successful in 42s
Push Workflows / nix-build (push) Successful in 5m0s
30 lines
495 B
Rust
30 lines
495 B
Rust
use dioxus::prelude::*;
|
|
|
|
const TAILWIND_CSS: Asset = asset!("/assets/tailwind.css");
|
|
|
|
#[derive(Debug, Clone, Routable, PartialEq)]
|
|
#[rustfmt::skip]
|
|
enum Route {
|
|
#[route("/")]
|
|
Home {},
|
|
}
|
|
|
|
#[component]
|
|
pub fn App() -> Element {
|
|
rsx! {
|
|
document::Link { rel: "stylesheet", href: TAILWIND_CSS }
|
|
Router::<Route> {}
|
|
}
|
|
}
|
|
|
|
/// Home page
|
|
#[component]
|
|
fn Home() -> Element {
|
|
rsx! {
|
|
p {
|
|
class: "text-lg",
|
|
"Hello, world!"
|
|
}
|
|
}
|
|
}
|