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,23 +14,16 @@
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import { useTheme } from '@material-ui/core';
import React from 'react';
import { Content, Header, Page } from '@backstage/core';
import { RollbarProjectTable } from '../RollbarProjectTable/RollbarProjectTable';
import { useRollbarEntities } from '../../hooks/useRollbarEntities';
export const RollbarHome = () => {
const backstageTheme = useTheme<BackstageTheme>();
const { entities, loading, error } = useRollbarEntities();
return (
<Page
theme={backstageTheme.getPageTheme({
themeId: 'tool',
})}
>
<Page themeId="tool">
<Header
title="Rollbar"
subtitle="Real-time error tracking & debugging tools for developers"
@@ -14,23 +14,16 @@
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import { useTheme } from '@material-ui/core';
import React from 'react';
import { Content, Header, HeaderLabel, Page } from '@backstage/core';
import { useCatalogEntity } from '../../hooks/useCatalogEntity';
import { RollbarProject } from '../RollbarProject/RollbarProject';
export const RollbarProjectPage = () => {
const backstageTheme = useTheme<BackstageTheme>();
const { entity } = useCatalogEntity();
return (
<Page
theme={backstageTheme.getPageTheme({
themeId: 'tool',
})}
>
<Page themeId="tool">
<Header title={entity?.metadata?.name} subtitle="Rollbar Project">
<HeaderLabel label="Owner" value={entity?.spec?.owner} />
<HeaderLabel label="Lifecycle" value={entity?.spec?.lifecycle} />