Skip to content

Commit d870cc1

Browse files
committed
Fix "clear result" button
1 parent 5fe6d96 commit d870cc1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/RunicPlayground/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ export class RunicPlayground extends Component<Props, State> {
5959
this.setState({ phoneticText: currentPhoneticText });
6060
};
6161

62+
clearResult = () => {
63+
this.setState({ phoneticText: "" });
64+
};
65+
6266
getPronunciation = (): string => {
6367
const tokens = parseString(this.state.phoneticText);
6468
let res = "";
@@ -129,7 +133,7 @@ export class RunicPlayground extends Component<Props, State> {
129133
</button>
130134
<button
131135
className="runic-playground__control-button"
132-
onClick={this.addPhoneme}
136+
onClick={this.clearResult}
133137
>
134138
<span className="runic-playground__control-icon">
135139
<ResetIcon />

0 commit comments

Comments
 (0)