Fix default page layout

Fixes https://github.com/spotify/backstage/issues/127
This commit is contained in:
Fredrik Adelöw
2020-03-06 19:00:19 +01:00
parent f1f9ce3d44
commit 62ccc37637
9 changed files with 67 additions and 96 deletions
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { Typography, makeStyles, Theme, Grid } from '@material-ui/core';
import { Typography, Grid } from '@material-ui/core';
import HomePageTimer from '../HomepageTimer';
import {
Content,
@@ -8,7 +8,7 @@ import {
SortableTable,
Header,
Page,
theme,
pageTheme,
} from '@spotify-backstage/core';
import SquadTechHealth from './SquadTechHealth';
@@ -17,18 +17,7 @@ const STATIC_DATA = [
{ id: 'backstage-microsite', kind: 'website' },
];
const useStyles = makeStyles<Theme>(theme => ({
mainContentArea: {
overflowX: 'hidden',
overflowY: 'auto',
},
avatarButton: {
padding: theme.spacing(2),
},
}));
const HomePage: FC<{}> = () => {
const classes = useStyles();
const columns = [
{ id: 'entity', label: 'ID' },
{ id: 'kind', label: 'Kind' },
@@ -49,30 +38,28 @@ const HomePage: FC<{}> = () => {
const profile = { givenName: 'Suzy' };
return (
<Page theme={theme.home}>
<div className={classes.mainContentArea}>
<Header
title={profile ? `Hello, ${profile.givenName}` : 'Hello'}
subtitle="Welcome to Backstage"
>
<HomePageTimer />
</Header>
<Content>
<Grid container direction="row" spacing={3}>
<Grid item xs={6}>
<Typography variant="h3" style={{ padding: '8px 0 16px 0' }}>
Things you own
</Typography>
<InfoCard maxWidth>
<SortableTable data={data} columns={columns} orderBy="id" />
</InfoCard>
</Grid>
<Grid item xs={6}>
<SquadTechHealth />
</Grid>
<Page theme={pageTheme.home}>
<Header
title={profile ? `Hello, ${profile.givenName}` : 'Hello'}
subtitle="Welcome to Backstage"
>
<HomePageTimer />
</Header>
<Content>
<Grid container direction="row" spacing={3}>
<Grid item xs={6}>
<Typography variant="h3" style={{ padding: '8px 0 16px 0' }}>
Things you own
</Typography>
<InfoCard maxWidth>
<SortableTable data={data} columns={columns} orderBy="id" />
</InfoCard>
</Grid>
</Content>
</div>
<Grid item xs={6}>
<SquadTechHealth />
</Grid>
</Grid>
</Content>
</Page>
);
};