Skip to content

Commit

Permalink
Add onDeploymentLoaded prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Anwardo committed Dec 23, 2019
1 parent 249d18b commit 98dfdf1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.1.0

- Add onDeploymentLoaded prop


# 1.0.1

- Fixed webview named import
Expand Down
5 changes: 4 additions & 1 deletion deployment/MopinionDeployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default class MopinionDeployment extends React.Component {
}
}
async fetchDeployment() {
const { onDeploymentLoaded=()=>{} } = this.props;
let deploymentURL = `https://mjolnir.mopinion.com/pastease/mobile/compact/${this.props.deploymentID}`;
fetch(deploymentURL, {
method: 'GET',
Expand Down Expand Up @@ -80,7 +81,9 @@ export default class MopinionDeployment extends React.Component {
deployment:deployment,
events:events,
forms:forms
},() =>{console.log(this.state)});
},() => {
onDeploymentLoaded(this.state);
});
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mopinion-react-native-sdk",
"description": "Collect in-app feedback with Mopinion for React Native. Built fully in React Native for optimal integration with your RN app.",
"version": "1.0.1",
"version": "1.1.0",
"devDependencies": {
"babel-preset-react-native-stage-0": "^1.0.1",
"react-devtools": "^3.2.1",
Expand Down

0 comments on commit 98dfdf1

Please sign in to comment.