diff --git a/packages/liveview/examples/warp.rs b/packages/liveview/examples/warp.rs
index a02a5231a..e20f07964 100644
--- a/packages/liveview/examples/warp.rs
+++ b/packages/liveview/examples/warp.rs
@@ -13,7 +13,7 @@ async fn main() {
// todo: compactify this routing under one liveview::app method
let view = liveview::new(addr);
- let body = view.body();
+ let body = view.body("
Dioxus LiveView");
let routes = warp::path::end()
.map(move || warp::reply::html(body.clone()))
diff --git a/packages/liveview/src/lib.rs b/packages/liveview/src/lib.rs
index 340a3e4ea..f3ad90511 100644
--- a/packages/liveview/src/lib.rs
+++ b/packages/liveview/src/lib.rs
@@ -31,14 +31,13 @@ pub struct Liveview {
}
impl Liveview {
- pub fn body(&self) -> String {
+ pub fn body(&self, header: &str) -> String {
format!(
r#"
- Dioxus app
-
+ {header}