link fe: remove unused comment loading logic

This never triggers anymore, comments loading always happens in onMount.
This commit is contained in:
Fang 2020-02-06 17:05:30 +01:00
parent 375755f106
commit 438d502c89
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 3 additions and 16 deletions

View File

@ -22,21 +22,6 @@ export class Comments extends Component {
}
}
componentDidUpdate(prevProps) {
if (prevProps !== this.props) {
let page = "page" + this.props.commentPage;
if ( (!this.props.comments || !this.props.comments[page]) &&
(this.state.requested !== this.props.commentPage)) {
this.setState({requested: this.props.commentPage});
api.getCommentsPage(
this.props.path,
this.props.url,
this.props.commentPage
);
}
}
}
render() {
let props = this.props;

View File

@ -27,7 +27,9 @@ export class LinkDetail extends Component {
componentDidMount() {
// if we have no preloaded data, and we aren't expecting it, get it
if (!this.props.data.url || !this.props.url) {
api.getSubmission(this.props.path, this.props.url, this.updateData.bind(this));
api.getSubmission(
this.props.path, this.props.url, this.updateData.bind(this)
);
}
this.updateTimeSinceNewestMessageInterval = setInterval( () => {