correct tests and use index resource type

This commit is contained in:
Maren Süwer
2018-10-15 13:52:45 +02:00
parent efdc57055d
commit 09130ca283
4 changed files with 18 additions and 14 deletions

View File

@@ -13,11 +13,12 @@ import {
isFetchIndexResourcesPending
} from "../modules/indexResource";
import PluginLoader from "./PluginLoader";
import type { IndexResources } from "@scm-manager/ui-types";
type Props = {
error: Error,
loading: boolean,
indexResources: any,
indexResources: IndexResources,
// dispatcher functions
fetchIndexResources: () => void,
@@ -34,7 +35,7 @@ class Index extends Component<Props> {
render() {
const { indexResources, loading, error, t } = this.props;
if (error) {
if (error) {
return (
<ErrorPage
title={t("app.error.title")}
@@ -42,10 +43,9 @@ class Index extends Component<Props> {
error={error}
/>
);
}
else if (loading || !indexResources) {
} else if (loading || !indexResources) {
return <Loading />;
} else {
} else {
return (
<PluginLoader>
<App />