diff --git a/client/src/components/atoms/CategoryImage.test.tsx b/client/src/components/atoms/CategoryImage.test.tsx
index 8e9fca4..f955c7a 100644
--- a/client/src/components/atoms/CategoryImage.test.tsx
+++ b/client/src/components/atoms/CategoryImage.test.tsx
@@ -16,8 +16,8 @@ describe('CategoryImage', () => {
})
it('renders all the category images', () => {
- const { options } = formPublish.steps[1].fields
- ? formPublish.steps[1].fields.categories
+ const { options } = formPublish.dataset.steps[1].fields
+ ? formPublish.dataset.steps[1].fields.categories
: []
options.map((category: string) => {
diff --git a/client/src/routes/Publish/index.tsx b/client/src/routes/Publish/index.tsx
index 1c05847..51a0dbe 100644
--- a/client/src/routes/Publish/index.tsx
+++ b/client/src/routes/Publish/index.tsx
@@ -11,23 +11,23 @@ class Publish extends Component<{}, PublishState> {
public state = {
type: 'start'
}
- publishDataset = () => {
+ public publishDataset = () => {
this.setState({ type: 'dataset' })
}
- publishContainer = () => {
+ public publishContainer = () => {
this.setState({ type: 'container' })
}
- publishAlgorithm = () => {
+ public publishAlgorithm = () => {
this.setState({ type: 'algorithm' })
}
- publishWorkflow = () => {
+ public publishWorkflow = () => {
this.setState({ type: 'workflow' })
}
public render() {
return (
{this.state.type !== 'start' && (
-
+
)}
{this.state.type === 'start' && (
{
description="What do you want to publish?"
>
-
+
-
+
)}
diff --git a/client/src/routes/Publish/loader.tsx b/client/src/routes/Publish/loader.tsx
index 8ef4448..0902201 100644
--- a/client/src/routes/Publish/loader.tsx
+++ b/client/src/routes/Publish/loader.tsx
@@ -31,8 +31,9 @@ class Loader extends Component {
isPublished: false,
publishedDid: '',
publishingError: '',
- validationStatus: ((dataPublishForm as any)[this.props.loadType]).validation,
- ...((dataPublishForm as any)[this.props.loadType]).defaults
+ validationStatus: (dataPublishForm as any)[this.props.loadType]
+ .validation,
+ ...(dataPublishForm as any)[this.props.loadType].defaults
}
private inputChange = (
@@ -57,7 +58,8 @@ class Loader extends Component {
private next = () => {
let { currentStep } = this.state
- const totalSteps = ((dataPublishForm as any)[this.props.loadType]).steps.length
+ const totalSteps = (dataPublishForm as any)[this.props.loadType].steps
+ .length
currentStep =
currentStep >= totalSteps - 1 ? totalSteps : currentStep + 1
@@ -85,7 +87,7 @@ class Loader extends Component {
isPublishing: false,
isPublished: false,
currentStep: 1,
- ...((dataPublishForm as any)[this.props.loadType]).defaults
+ ...(dataPublishForm as any)[this.props.loadType].defaults
})
}
@@ -229,28 +231,37 @@ class Loader extends Component {
)}
-
+
)