chore: refactor

This commit is contained in:
Marvin9
2020-10-15 09:16:39 +05:30
parent ba056b1ba8
commit 8f0608a5ed
34 changed files with 72 additions and 263 deletions
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import {
Content,
ContentHeader,
@@ -27,7 +26,7 @@ import {
StructuredMetadataTable,
SupportButton,
} from '@backstage/core';
import { Button, Grid, TextField, useTheme } from '@material-ui/core';
import { Button, Grid, TextField } from '@material-ui/core';
import React, { useState } from 'react';
export const Project = () => {
@@ -112,14 +111,8 @@ const labels = (
);
export const NewProjectPage = () => {
const backstageTheme = useTheme<BackstageTheme>();
return (
<Page
theme={backstageTheme.getPageTheme({
themeId: 'service',
})}
>
<Page themeId="service">
<Header title="New GCP Project" type="tool">
{labels}
</Header>
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import {
Content,
ContentHeader,
@@ -36,7 +35,6 @@ import {
TableRow,
Theme,
Typography,
useTheme,
} from '@material-ui/core';
import React from 'react';
import { useAsync } from 'react-use';
@@ -148,13 +146,8 @@ const labels = (
);
export const ProjectDetailsPage = () => {
const backstageTheme = useTheme<BackstageTheme>();
return (
<Page
theme={backstageTheme.getPageTheme({
themeId: 'service',
})}
>
<Page themeId="service">
<Header title="GCP Project Details" type="other">
{labels}
</Header>
@@ -15,7 +15,6 @@
*/
// NEEDS WORK
import { BackstageTheme } from '@backstage/theme';
import {
Content,
ContentHeader,
@@ -38,7 +37,6 @@ import {
TableRow,
Tooltip,
Typography,
useTheme,
} from '@material-ui/core';
import React from 'react';
import { useAsync } from 'react-use';
@@ -135,14 +133,8 @@ const PageContents = () => {
};
export const ProjectListPage = () => {
const backstageTheme = useTheme<BackstageTheme>();
return (
<Page
theme={backstageTheme.getPageTheme({
themeId: 'service',
})}
>
<Page themeId="service">
<Header title="GCP Projects" type="tool">
{labels}
</Header>