1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

Fix eslint warnings (#5635)

* 01 fix eslint warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings

* fix code warnings
This commit is contained in:
Michael An
2023-09-13 08:40:50 +08:00
committed by GitHub
parent d829ba5b23
commit 14ce391007
520 changed files with 4774 additions and 3438 deletions

View File

@@ -36,7 +36,7 @@ class Notification extends React.Component {
this.loadNotices();
this.setState({showNotice: true});
}
}
};
loadNotices = () => {
let page = 1;
@@ -45,7 +45,7 @@ class Notification extends React.Component {
let noticeList = res.data.notification_list;
this.setState({noticeList: noticeList});
});
}
};
onNoticeItemClick = (noticeItem) => {
let noticeList = this.state.noticeList.map(item => {
@@ -61,22 +61,22 @@ class Notification extends React.Component {
unseenCount: unseenCount,
});
}
};
getInitDialogState = () => {
const searchParams = Utils.getUrlSearches();
return searchParams.notifications === 'all';
}
};
onNotificationDialogToggle = () => {
let newSearch = this.state.isShowNotificationDialog ? null : 'all';
Utils.updateSearchParameter('notifications', newSearch);
this.setState({isShowNotificationDialog: !this.state.isShowNotificationDialog});
}
};
onNotificationListToggle = () => {
this.setState({showNotice: false});
}
};
onMarkAllNotifications = () => {
seafileAPI.updateNotifications().then(() => {
@@ -88,7 +88,7 @@ class Notification extends React.Component {
errorMsg: Utils.getErrorMsg(error, true)
});
});
}
};
render() {
const { unseenCount } = this.state;
@@ -98,7 +98,7 @@ class Notification extends React.Component {
<span className="sf2-icon-bell" id="notification-popover"></span>
<span className={`num ${unseenCount ? '' : 'hide'}`}>{unseenCount}</span>
</a>
{this.state.showNotice &&
{this.state.showNotice &&
<NotificationPopover
headerText={gettext('Notification')}
bodyText={gettext('Mark all as read')}