mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 07:01:12 +00:00
[group] added 'load more repos' (#4649)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import React, {Fragment} from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import SharedRepoListItem from './shared-repo-list-item';
|
||||
import toaster from '../toast';
|
||||
import LibsMobileThead from '../libs-mobile-thead';
|
||||
import Loading from '../loading';
|
||||
|
||||
const propTypes = {
|
||||
libraryType: PropTypes.string,
|
||||
@@ -18,6 +19,7 @@ const propTypes = {
|
||||
onItemDelete: PropTypes.func,
|
||||
onItemDetails: PropTypes.func,
|
||||
onItemRename: PropTypes.func,
|
||||
hasNextPage: PropTypes.bool
|
||||
};
|
||||
|
||||
class SharedRepoListView extends React.Component {
|
||||
@@ -141,10 +143,16 @@ class SharedRepoListView extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (Utils.isDesktop()) {
|
||||
return this.renderPCUI();
|
||||
const table = Utils.isDesktop() ? this.renderPCUI() : this.renderMobileUI();
|
||||
if (this.props.hasNextPage) {
|
||||
return (
|
||||
<Fragment>
|
||||
{table}
|
||||
<Loading />
|
||||
</Fragment>
|
||||
);
|
||||
} else {
|
||||
return this.renderMobileUI();
|
||||
return table;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user