chore: remove explicit return

This commit is contained in:
Marvin9
2020-10-15 13:52:18 +05:30
parent fe47cb9f07
commit fe4926cb75
10 changed files with 207 additions and 233 deletions
@@ -21,15 +21,13 @@ type Props = {
children?: React.ReactNode;
};
export const ApiExplorerLayout = ({ children }: Props) => {
return (
<Page themeId="home">
<Header
title="APIs"
subtitle="Backstage API Explorer"
pageTitleOverride="APIs"
/>
{children}
</Page>
);
};
export const ApiExplorerLayout = ({ children }: Props) => (
<Page themeId="home">
<Header
title="APIs"
subtitle="Backstage API Explorer"
pageTitleOverride="APIs"
/>
{children}
</Page>
);
@@ -110,20 +110,18 @@ const labels = (
</>
);
export const NewProjectPage = () => {
return (
<Page themeId="service">
<Header title="New GCP Project" type="tool">
{labels}
</Header>
<Content>
<ContentHeader title="">
<SupportButton>
This plugin allows you to view and interact with your gcp projects.
</SupportButton>
</ContentHeader>
<Project />
</Content>
</Page>
);
};
export const NewProjectPage = () => (
<Page themeId="service">
<Header title="New GCP Project" type="tool">
{labels}
</Header>
<Content>
<ContentHeader title="">
<SupportButton>
This plugin allows you to view and interact with your gcp projects.
</SupportButton>
</ContentHeader>
<Project />
</Content>
</Page>
);
@@ -145,18 +145,16 @@ const labels = (
</>
);
export const ProjectDetailsPage = () => {
return (
<Page themeId="service">
<Header title="GCP Project Details" type="other">
{labels}
</Header>
<Content>
<ContentHeader title="">
<SupportButton>Support Button</SupportButton>
</ContentHeader>
<DetailsPage />
</Content>
</Page>
);
};
export const ProjectDetailsPage = () => (
<Page themeId="service">
<Header title="GCP Project Details" type="other">
{labels}
</Header>
<Content>
<ContentHeader title="">
<SupportButton>Support Button</SupportButton>
</ContentHeader>
<DetailsPage />
</Content>
</Page>
);
@@ -132,21 +132,19 @@ const PageContents = () => {
);
};
export const ProjectListPage = () => {
return (
<Page themeId="service">
<Header title="GCP Projects" type="tool">
{labels}
</Header>
<Content>
<ContentHeader title="">
<Button variant="contained" color="primary" href="/gcp-projects/new">
New Project
</Button>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<PageContents />
</Content>
</Page>
);
};
export const ProjectListPage = () => (
<Page themeId="service">
<Header title="GCP Projects" type="tool">
{labels}
</Header>
<Content>
<ContentHeader title="">
<Button variant="contained" color="primary" href="/gcp-projects/new">
New Project
</Button>
<SupportButton>All your software catalog entities</SupportButton>
</ContentHeader>
<PageContents />
</Content>
</Page>
);
@@ -191,20 +191,16 @@ export const AuditViewContent: FC<{}> = () => {
);
};
const ConnectedAuditView = () => {
return (
<Page themeId="tool">
<Header
title="Lighthouse"
subtitle="Website audits powered by Lighthouse"
>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Alpha" />
</Header>
<Content stretch>
<AuditViewContent />
</Content>
</Page>
);
};
const ConnectedAuditView = () => (
<Page themeId="tool">
<Header title="Lighthouse" subtitle="Website audits powered by Lighthouse">
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Alpha" />
</Header>
<Content stretch>
<AuditViewContent />
</Content>
</Page>
);
export default ConnectedAuditView;
@@ -168,21 +168,16 @@ export const CreateAuditContent: FC<{}> = () => {
);
};
const CreateAudit = () => {
return (
<Page themeId="tool">
<Header
title="Lighthouse"
subtitle="Website audits powered by Lighthouse"
>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Alpha" />
</Header>
<Content>
<CreateAuditContent />
</Content>
</Page>
);
};
const CreateAudit = () => (
<Page themeId="tool">
<Header title="Lighthouse" subtitle="Website audits powered by Lighthouse">
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Alpha" />
</Header>
<Content>
<CreateAuditContent />
</Content>
</Page>
);
export default CreateAudit;
@@ -26,25 +26,24 @@ import {
} from '@backstage/core';
import NewRelicFetchComponent from '../NewRelicFetchComponent';
const NewRelicComponent: FC<{}> = () => {
return (
<Page themeId="tool">
<Header title="New Relic">
<HeaderLabel label="Owner" value="Engineering" />
</Header>
<Content>
<ContentHeader title="New Relic">
<SupportButton>
New Relic Application Performance Monitoring
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="column">
<Grid item>
<NewRelicFetchComponent />
</Grid>
const NewRelicComponent: FC<{}> = () => (
<Page themeId="tool">
<Header title="New Relic">
<HeaderLabel label="Owner" value="Engineering" />
</Header>
<Content>
<ContentHeader title="New Relic">
<SupportButton>
New Relic Application Performance Monitoring
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="column">
<Grid item>
<NewRelicFetchComponent />
</Grid>
</Content>
</Page>
);
};
</Grid>
</Content>
</Page>
);
export default NewRelicComponent;
+22 -23
View File
@@ -38,30 +38,29 @@ export const RadarPage = ({
subtitle,
pageTitle,
...props
}: TechRadarPageProps): JSX.Element => {
return (
<Page themeId="tool">
<Header title={title} subtitle={subtitle}>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Beta" />
</Header>
<Content>
<ContentHeader title={pageTitle}>
<SupportButton>
This is used for visualizing the official guidelines of different
areas of software development such as languages, frameworks,
infrastructure and processes.
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="row">
<Grid item xs={12} sm={6} md={4}>
<RadarComponent {...props} />
</Grid>
}: TechRadarPageProps): JSX.Element => (
<Page themeId="tool">
<Header title={title} subtitle={subtitle}>
<HeaderLabel label="Owner" value="Spotify" />
<HeaderLabel label="Lifecycle" value="Beta" />
</Header>
<Content>
<ContentHeader title={pageTitle}>
<SupportButton>
This is used for visualizing the official guidelines of different
areas of software development such as languages, frameworks,
infrastructure and processes.
</SupportButton>
</ContentHeader>
<Grid container spacing={3} direction="row">
<Grid item xs={12} sm={6} md={4}>
<RadarComponent {...props} />
</Grid>
</Content>
</Page>
);
};
</Grid>
</Content>
</Page>
);
RadarPage.defaultProps = {
title: 'Tech Radar',
subtitle: 'Pick the recommended technologies for your projects',