Skip to content

Commit

Permalink
Fix "clear result" button
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanpingle committed Sep 30, 2024
1 parent 5fe6d96 commit d870cc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/RunicPlayground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export class RunicPlayground extends Component<Props, State> {
this.setState({ phoneticText: currentPhoneticText });
};

clearResult = () => {
this.setState({ phoneticText: "" });
};

getPronunciation = (): string => {
const tokens = parseString(this.state.phoneticText);
let res = "";
Expand Down Expand Up @@ -129,7 +133,7 @@ export class RunicPlayground extends Component<Props, State> {
</button>
<button
className="runic-playground__control-button"
onClick={this.addPhoneme}
onClick={this.clearResult}
>
<span className="runic-playground__control-icon">
<ResetIcon />
Expand Down

0 comments on commit d870cc1

Please sign in to comment.