Fix create button visible for unprivileged user

This commit is contained in:
René Pfeuffer
2019-02-25 14:16:45 +01:00
parent 3c99a21595
commit fbb0d2cf34
3 changed files with 37 additions and 24 deletions

View File

@@ -73,13 +73,6 @@ class Overview extends React.Component<Props> {
error={error}
>
{this.renderList()}
<PageActions>
<Button
label={t("overview.createButton")}
link="/repos/create"
color="primary"
/>
</PageActions>
</Page>
);
}
@@ -102,7 +95,19 @@ class Overview extends React.Component<Props> {
const { showCreateButton, t } = this.props;
if (showCreateButton) {
return (
<CreateButton label={t("overview.createButton")} link="/repos/create" />
<>
<CreateButton
label={t("overview.createButton")}
link="/repos/create"
/>
<PageActions>
<Button
label={t("overview.createButton")}
link="/repos/create"
color="primary"
/>
</PageActions>
</>
);
}
return null;