diff options
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r-- | ui/src/components/comment-form.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index aa8e651d..f3009d34 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -1,4 +1,5 @@ import { Component, linkEvent } from 'inferno'; +import { Prompt } from 'inferno-router'; import { CommentNode as CommentNodeI, CommentForm as CommentFormI, @@ -87,6 +88,10 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { render() { return ( <div class="mb-3"> + <Prompt + when={this.state.commentForm.content} + message={i18n.t('block_leaving')} + /> <form onSubmit={linkEvent(this, this.handleCommentSubmit)}> <div class="form-group row"> <div className={`col-sm-12`}> |