Fix some squigglies/warnings in new plugins

This commit is contained in:
Fredrik Adelöw
2020-03-06 15:08:37 +01:00
parent b604d82439
commit 90eb43a618
3 changed files with 17 additions and 12 deletions
@@ -1,5 +1,5 @@
# Title
Welcome to your {{id}} plugin!
Welcome to the {{id}} plugin!
## Sub-section 1
@@ -1,6 +1,11 @@
import React, { FC } from 'react';
import { Typography, Grid, makeStyles, Theme } from '@material-ui/core';
import { InfoCard, Header, Page, theme } from '@spotify-backstage/core';
import {
InfoCard,
Header,
Page,
theme as pageTheme,
} from '@spotify-backstage/core';
import ExampleFetchComponent from '../ExampleFetchComponent';
const useStyles = makeStyles<Theme>(theme => ({
@@ -12,7 +17,7 @@ const useStyles = makeStyles<Theme>(theme => ({
padding: theme.spacing(3),
},
title: {
padding: theme.spacing(1,0,2,0),
padding: theme.spacing(1, 0, 2, 0),
},
}));
@@ -20,13 +25,13 @@ const ExampleComponent: FC<{}> = () => {
const classes = useStyles();
return (
<Page theme={theme.tool}>
<Page theme={pageTheme.tool}>
<div className={classes.mainContentArea}>
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle"></Header>
<Header title="Welcome to {{ id }}!" subtitle="Optional subtitle" />
<Grid
container
spacing={3}
direction={'column'}
direction="column"
className={classes.pageBody}
>
<Grid item>
@@ -19,22 +19,22 @@ const useStyles = makeStyles({
type User = {
gender: string; // "male"
name: {
title: string; //"Mr",
title: string; // "Mr",
first: string; // "Duane",
last: string; //"Reed"
last: string; // "Reed"
};
location: object; // {street: {number: 5060, name: "Hickory Creek Dr"}, city: "Albany", state: "New South Wales",…}
email: string; // "duane.reed@example.com"
login: object; // {uuid: "4b785022-9a23-4ab9-8a23-cb3fb43969a9", username: "blackdog796", password: "patch",…}
dob: object; // {date: "1983-06-22T12:30:23.016Z", age: 37}
registered: object; // {date: "2006-06-13T18:48:28.037Z", age: 14}
phone: string; //"07-2154-5651"
phone: string; // "07-2154-5651"
cell: string; // "0405-592-879"
id: {
name: string; // "TFN",
value: string; // "796260432"
};
picture: object; //{large: "https://randomuser.me/api/portraits/men/95.jpg",…}
picture: object; // {large: "https://randomuser.me/api/portraits/men/95.jpg",…}
nat: string; // "AU"
};
@@ -82,9 +82,9 @@ const ExampleFetchComponent: FC<{}> = () => {
return <LinearProgress data-testid="progress" />;
} else if (error) {
return <Alert severity="error">{error.message}</Alert>;
} else {
return <DenseTable users={value || []} />;
}
return <DenseTable users={value || []} />;
};
export default ExampleFetchComponent;