From d870cc1152ae6134247e6053be11708d89b71e48 Mon Sep 17 00:00:00 2001 From: robo-mop Date: Mon, 30 Sep 2024 09:29:36 +0530 Subject: [PATCH] Fix "clear result" button --- src/components/RunicPlayground/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/RunicPlayground/index.tsx b/src/components/RunicPlayground/index.tsx index 272f183..a37351a 100644 --- a/src/components/RunicPlayground/index.tsx +++ b/src/components/RunicPlayground/index.tsx @@ -59,6 +59,10 @@ export class RunicPlayground extends Component { this.setState({ phoneticText: currentPhoneticText }); }; + clearResult = () => { + this.setState({ phoneticText: "" }); + }; + getPronunciation = (): string => { const tokens = parseString(this.state.phoneticText); let res = ""; @@ -129,7 +133,7 @@ export class RunicPlayground extends Component {