diff options
author | Shav Kinderlehrer <[email protected]> | 2024-03-06 11:45:18 -0500 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2024-03-06 11:45:18 -0500 |
commit | a5dbccee4f22de991e33449ae1d1835269c6075d (patch) | |
tree | 8a530c8efe28afb61768f0d44c7e71c7049829e2 /src/components/hello_world.rs | |
parent | 557d3f32fd2ac7a21bd3da01e8e903db16a31e7e (diff) | |
download | molehole-a5dbccee4f22de991e33449ae1d1835269c6075d.tar.gz molehole-a5dbccee4f22de991e33449ae1d1835269c6075d.zip |
Fix event handling
Diffstat (limited to 'src/components/hello_world.rs')
-rw-r--r-- | src/components/hello_world.rs | 5 |
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); |