aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ReplyForm.js10
-rw-r--r--src/Thread.js2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ReplyForm.js b/src/ReplyForm.js
index 70e5d49..1dab761 100644
--- a/src/ReplyForm.js
+++ b/src/ReplyForm.js
@@ -34,7 +34,7 @@ class ReplyForm extends Component {
() => {
const { submittedName, submittedEmail, submittedMessage } = this.state;
const data = {
- board: this.props.dir,
+ board: this.props.currentBoard.dir,
parent: this.props.parent,
name: "",
email: "",
@@ -67,6 +67,14 @@ class ReplyForm extends Component {
render() {
const { name, email, message, replyRes } = this.state;
+ if (this.props.locked === 1) {
+ return (
+ <Message negative>
+ <Message.Header>Hilo cerrado</Message.Header>
+ Este hilo ha sido cerrado y no admite nuevas respuestas.
+ </Message>
+ );
+ }
return (
<Segment>
{replyRes !== null ? (
diff --git a/src/Thread.js b/src/Thread.js
index 058f0b5..e2edf7a 100644
--- a/src/Thread.js
+++ b/src/Thread.js
@@ -173,7 +173,7 @@ class Thread extends Component {
))}
</Comment.Group>
- <ReplyForm dir={this.props.dir} parent={id} />
+ <ReplyForm currentBoard={currentBoard} parent={id} locked={locked} />
<a
href={`https://bienvenidoainternet.org/cgi/api/thread?dir=${this.props.dir}&id=${this.props.id}`}