diff --git a/embark-ui/src/containers/ApplicationPreviewContainer.js b/embark-ui/src/containers/ApplicationPreviewContainer.js
index 1b880ae55..7754a6028 100644
--- a/embark-ui/src/containers/ApplicationPreviewContainer.js
+++ b/embark-ui/src/containers/ApplicationPreviewContainer.js
@@ -1,3 +1,4 @@
+import PropTypes from 'prop-types';
import React from 'react';
class ApplicationPreviewContainer extends React.Component {
@@ -5,7 +6,8 @@ class ApplicationPreviewContainer extends React.Component {
super(props);
this.state = {
- previewUrl: 'http://localhost:8000'
+ // TODO(andremedeiros): Figure out how to pull this from the actual host.
+ previewUrl: this.props.previewHomepage
};
}
@@ -18,7 +20,7 @@ class ApplicationPreviewContainer extends React.Component {
-
+
);
}
@@ -37,9 +39,17 @@ class ApplicationPreviewContainer extends React.Component {
}
handlePreviewGo() {
- this.previewIframe.src = this.previewUrl;
+ this.previewIframe.src = this.state.previewUrl;
}
}
+ApplicationPreviewContainer.propTypes = {
+ previewHomepage: PropTypes.string
+};
+
+ApplicationPreviewContainer.defaultProps = {
+ previewHomepage: 'http://localhost:8000'
+};
+
export default ApplicationPreviewContainer;