Push for 0.1.0

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-05-14 11:33:25 +02:00
parent a6c382fc8b
commit 4b56557d15
8 changed files with 64 additions and 153 deletions

View File

@@ -1,6 +1,8 @@
#![allow(non_snake_case)]
use dioxus::fullstack::Config;
use dioxus::prelude::*;
use tracing::Level;
pub mod components;
@@ -34,7 +36,13 @@ pub enum Route {
fn main() {
dioxus_logger::init(Level::DEBUG).expect("failed to init logger");
launch(App);
let config = server_only!(
dioxus::fullstack::Config::new().addr(std::net::SocketAddrV4::new(
std::net::Ipv4Addr::new(0, 0, 0, 0),
8080,
))
);
LaunchBuilder::fullstack().with_cfg(config).launch(App)
}
fn App() -> Element {
@@ -73,7 +81,7 @@ pub fn Body(prop: BodyProp) -> Element {
div {
class: "flex justify-center my-4",
div {
class: "max-w-screen-md min-w-full",
class: "max-w-screen-xl min-w-full",
{prop.children}
}
}