summaryrefslogtreecommitdiff
path: root/webapp/src/main.rs
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-09-03 18:52:40 -0400
committerKjetil Orbekk <kj@orbekk.com>2022-09-03 19:14:16 -0400
commit1c2d88434021f25c43c2503cfce72ef5336c288e (patch)
tree98af21e2a4187d32bad5a3e75a972f6369256ecd /webapp/src/main.rs
parent5abdd7c876e821fa6b7be0f8e7298b9a4c9e1d20 (diff)
Yew skeleton project
Diffstat (limited to 'webapp/src/main.rs')
-rw-r--r--webapp/src/main.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/webapp/src/main.rs b/webapp/src/main.rs
index e7a11a9..baeeff9 100644
--- a/webapp/src/main.rs
+++ b/webapp/src/main.rs
@@ -1,3 +1,22 @@
+use yew::prelude::*;
+
+#[function_component(App)]
+fn app() -> Html {
+ html! {
+ <>
+ <h1>{ "Hello, World" }</h1>
+ <Card/>
+ </>
+ }
+}
+
+#[function_component(Card)]
+fn card() -> Html {
+ html! {
+ <div class="card" draggable="true" />
+ }
+}
+
fn main() {
- println!("Hello, world!");
+ yew::start_app::<App>();
}