Skip to content

Commit

Permalink
Rename juttleSource in juttle-view to bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Nibecker committed Feb 3, 2016
1 parent 87a0b28 commit 50f4a48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/apps/run/components/juttle-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,29 @@ class JuttleViewer extends Component {
}

render() {
if (!this.props.juttleSource) {
if (!this.props.bundle) {
return false;
}

let juttleSource = false;
let bundle = false;

if (this.state.sourceVisible) {
juttleSource = (<pre className='juttle-source'>{this.props.juttleSource.program}</pre>);
bundle = (<pre className='juttle-source'>{this.props.bundle.program}</pre>);
}

return (
<div>
<a className='juttle-source-toggle' onClick={this._onToggleVisiblityClick.bind(this)}>
{this.state.sourceVisible ? 'Hide Juttle' : 'Show Juttle'}
</a>
{juttleSource}
{bundle}
</div>
)
}
}

JuttleViewer.PropTypes = {
bundle: React.PropTypes.object
};

export default JuttleViewer;
4 changes: 2 additions & 2 deletions src/apps/run/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RunApp extends React.Component {
if (nextProps.bundle !== this.props.bundle) {
this.errors.clear();
this.inputs.clear();

this.view.clear()
.then(() => {
if (nextProps.bundle) {
Expand Down Expand Up @@ -59,7 +59,7 @@ class RunApp extends React.Component {
return (
<div className="app-main">
<div className="main-view">
<JuttleViewer juttleSource={this.props.bundle} />
<JuttleViewer bundle={this.props.bundle} />
<div ref="juttleSource"></div>
<div ref="juttleViewLayout"></div>
<div ref="errorView"></div>
Expand Down

0 comments on commit 50f4a48

Please sign in to comment.