1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Repair eslint wraning (#2453)

This commit is contained in:
山水人家
2018-10-16 18:19:51 +08:00
committed by Daniel Pan
parent 80b7e562a0
commit fdbb39a6d3
43 changed files with 498 additions and 264 deletions

View File

@@ -8,20 +8,20 @@ class Notification extends React.Component {
this.state = {
showNotice: false,
notice_html: ''
}
};
}
onClick = () => {
this.setState({
showNotice: !this.state.showNotice
})
});
if (!this.state.showNotice) {
this.loadNotices()
this.loadNotices();
}
if (this.state.showNotice) {
seafileAPI.updateNotifications()
seafileAPI.updateNotifications();
}
}
@@ -29,8 +29,8 @@ class Notification extends React.Component {
seafileAPI.listPopupNotices().then(res => {
this.setState({
notice_html: res.data.notice_html
})
})
});
});
}
render() {
@@ -49,13 +49,12 @@ class Notification extends React.Component {
<a href="#" onClick={this.onClick} title={gettext('Close')} aria-label={gettext('Close')} className="sf-popover-close js-close sf2-icon-x1 op-icon float-right"></a>
</div>
<div className="sf-popover-con">
<ul className="notice-list" dangerouslySetInnerHTML={{__html: notice_html}}>
</ul>
<ul className="notice-list" dangerouslySetInnerHTML={{__html: notice_html}}></ul>
<a href="/notification/list/" className="view-all">{gettext('See All Notifications')}</a>
</div>
</div>
</div>
)
);
}
}