Clean up for yarn tsc and fix the simple settep for project creation

This commit is contained in:
ebarrios
2020-07-28 17:12:54 +02:00
parent 2c13894037
commit 082d667854
2 changed files with 20 additions and 15 deletions
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React, { FC, useState, Fragment } from 'react';
import React, { FC, useState } from 'react';
import { Grid, Button, TextField } from '@material-ui/core';
import {
@@ -34,7 +34,7 @@ import {
export const Project: FC<{}> = () => {
const [projectName, setProjectName] = useState('');
const [projectId, setProjectId] = useState('');
const [done, setDone] = useState(false);
const [disabled, setDisabled] = useState(true);
const metadata = {
ProjectName: projectName,
@@ -69,17 +69,15 @@ export const Project: FC<{}> = () => {
fullWidth
/>
</SimpleStepperStep>
<SimpleStepperStep title="" end>
<SimpleStepperStep
title="Review"
actions={{
nextText: 'Confirm',
onNext: () => setDisabled(false),
}}
>
<StructuredMetadataTable metadata={metadata} />
<Button
variant="contained"
color="primary"
href={`newProject?projectName=${encodeURIComponent(
projectName,
)},projectId=${encodeURIComponent(projectId)}`}
>
Confirm
</Button>
</SimpleStepperStep>
</SimpleStepper>
<Button
@@ -90,6 +88,16 @@ export const Project: FC<{}> = () => {
>
Cancel
</Button>
<Button
variant="contained"
color="primary"
disabled={disabled}
href={`newProject?projectName=${encodeURIComponent(
projectName,
)},projectId=${encodeURIComponent(projectId)}`}
>
Create
</Button>
</InfoCard>
</Grid>
</Grid>
@@ -20,7 +20,6 @@ import {
Link,
useApi,
googleAuthApiRef,
InfoCard,
HeaderLabel,
Page,
Header,
@@ -31,7 +30,6 @@ import {
} from '@backstage/core';
import {
LinearProgress,
makeStyles,
Paper,
Table,
TableBody,
@@ -39,7 +37,6 @@ import {
TableContainer,
TableHead,
TableRow,
Theme,
Tooltip,
Typography,
Button,