Heed peer review

This commit is contained in:
René Pfeuffer
2020-09-10 08:37:37 +02:00
parent e81341b601
commit 4df9c2947b
4 changed files with 21 additions and 21 deletions

View File

@@ -95,7 +95,7 @@ class Overview extends React.Component<Props> {
getReposLink = () => {
const { namespace, namespaces, reposLink } = this.props;
if (namespace) {
return namespaces?.find(n => n.namespace === namespace)?._links?.repositories?.href;
return namespaces?._embedded.namespaces.find(n => n.namespace === namespace)?._links?.repositories?.href;
} else {
return reposLink;
}
@@ -114,7 +114,7 @@ class Overview extends React.Component<Props> {
const link = namespace ? `repos/${namespace}` : "repos";
const namespacesToRender = namespaces?["", ...namespaces.map(n => n.namespace).sort()]:[];
const namespacesToRender = namespaces ? ["", ...namespaces._embedded.namespaces.map(n => n.namespace).sort()] : [];
return (
<Page title={t("overview.title")} subtitle={t("overview.subtitle")} loading={loading} error={error}>