diff --git a/scm-ui/ui-webapp/src/repos/sources/components/FileTree.tsx b/scm-ui/ui-webapp/src/repos/sources/components/FileTree.tsx index 00cf1de981..f3ecba8982 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/FileTree.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/FileTree.tsx @@ -105,7 +105,6 @@ class FileTree extends React.Component { return (
{this.renderSourcesTable()} - {lastHunk.loading && } {lastHunk.tree?.truncated &&
); @@ -124,6 +123,10 @@ class FileTree extends React.Component { }); } + if (hunks.every(hunk => hunk.loading)) { + return ; + } + hunks .filter(hunk => !hunk.loading) .forEach(hunk => { @@ -144,23 +147,26 @@ class FileTree extends React.Component { } return ( - - - - - - - - - {binder.hasExtension("repos.sources.tree.row.right") && - - - {files.map((file: any) => ( - - ))} - -
{t("sources.file-tree.name")}{t("sources.file-tree.length")}{t("sources.file-tree.commitDate")}{t("sources.file-tree.description")}} -
+ <> + + + + + + + + + {binder.hasExtension("repos.sources.tree.row.right") && + + + {files.map((file: any) => ( + + ))} + +
{t("sources.file-tree.name")}{t("sources.file-tree.length")}{t("sources.file-tree.commitDate")}{t("sources.file-tree.description")}} +
+ {hunks[hunks.length - 1].loading && } + ); } return {t("sources.noSources")}; @@ -185,7 +191,6 @@ const mapStateToProps = (state: any, ownProps: Props) => { const hunkCount = getHunkCount(state, repository, revision, path); const hunks = []; for (let i = 0; i < hunkCount; ++i) { - console.log(`getting data for hunk ${i}`); const tree = getSources(state, repository, revision, path, i); const loading = isFetchSourcesPending(state, repository, revision, path, i); hunks.push({