aboutsummaryrefslogtreecommitdiff
path: root/src/components/hello_world.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/hello_world.rs')
-rw-r--r--src/components/hello_world.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/hello_world.rs b/src/components/hello_world.rs
index 22c966c..afb9d47 100644
--- a/src/components/hello_world.rs
+++ b/src/components/hello_world.rs
@@ -9,6 +9,11 @@ pub struct HelloWorld {
}
impl Component for HelloWorld {
+ fn init(&mut self) -> eyre::Result<()> {
+ self.text = "Hello, world!".to_string();
+ Ok(())
+ }
+
fn render(&mut self, frame: &mut Frame, rect: Rect) -> eyre::Result<()> {
frame.render_widget(Paragraph::new(self.text.clone()), rect);