mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +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:
@@ -1,4 +1,5 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import moment from 'moment';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { gettext } from '../../utils/constants';
|
||||
@@ -57,11 +58,6 @@ class OrgUserOwnedRepos extends Component {
|
||||
}
|
||||
|
||||
class Content extends Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
loading, errorMsg, repo_list
|
||||
@@ -97,6 +93,10 @@ class Content extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
Content.propTypes = {
|
||||
data: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
class Item extends Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -113,24 +113,24 @@ class Item extends Component {
|
||||
this.setState({
|
||||
isOpIconShown: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleMouseOut = () => {
|
||||
this.setState({
|
||||
isOpIconShown: false
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleDeleteIconClick = (e) => {
|
||||
e.preventDefault();
|
||||
this.toggleDeleteRepoDialog();
|
||||
}
|
||||
};
|
||||
|
||||
toggleDeleteRepoDialog = () => {
|
||||
this.setState({
|
||||
isDeleteRepoDialogOpen: !this.state.isDeleteRepoDialogOpen
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
deleteRepo = () => {
|
||||
const repo = this.props.data;
|
||||
@@ -147,7 +147,7 @@ class Item extends Component {
|
||||
|
||||
this.setState({isRepoDeleted: false});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { deleted, isOpIconShown, isDeleteRepoDialogOpen } = this.state;
|
||||
@@ -183,4 +183,13 @@ class Item extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
Item.propTypes = {
|
||||
data: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
OrgUserOwnedRepos.propTypes = {
|
||||
email: PropTypes.string,
|
||||
};
|
||||
|
||||
|
||||
export default OrgUserOwnedRepos;
|
||||
|
Reference in New Issue
Block a user