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:
@@ -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>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user