-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds workflow contents, by ID. Lists all workflow strings.
- Loading branch information
1 parent
ee40aae
commit a3d9ed7
Showing
6 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import fixIt, { options } from 'react-fix-it'; | ||
|
||
const propTypes = { | ||
contents: PropTypes.object.isRequired, | ||
}; | ||
|
||
options.log = (test) => { | ||
console.warn(test); | ||
}; | ||
|
||
class WorkflowContents extends Component { | ||
|
||
render() { | ||
const { contents } = this.props; | ||
const workflow_contents = contents.data.length ? contents.data[0] : {strings: []}; | ||
console.log(workflow_contents) | ||
const strings = []; | ||
for (const key in workflow_contents.strings) { | ||
strings.push(<p key={key}><b>{key}</b> {workflow_contents.strings[key]}</p>); | ||
} | ||
return ( | ||
<div> | ||
<h2>Workflow Contents</h2> | ||
{strings} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
WorkflowContents.propTypes = propTypes; | ||
export default fixIt(WorkflowContents); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters