mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
link fe: remove unused comment loading logic
This never triggers anymore, comments loading always happens in onMount.
This commit is contained in:
parent
375755f106
commit
438d502c89
@ -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;
|
||||
|
||||
|
@ -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( () => {
|
||||
|
Loading…
Reference in New Issue
Block a user