tg-core-components 6.1.1 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,6 +139,16 @@ var DepositWidget = function (_Component) {
139
139
  }
140
140
 
141
141
  _createClass(DepositWidget, [{
142
+ key: 'componentDidUpdate',
143
+ value: function componentDidUpdate(prevProps) {
144
+ // Update state when the bonus code updates in props
145
+ if (this.props.bonusCode !== prevProps.bonusCode) {
146
+ this.setState({
147
+ bonusCode: this.props.bonusCode
148
+ });
149
+ }
150
+ }
151
+ }, {
142
152
  key: 'render',
143
153
  value: function render() {
144
154
  var _this2 = this;
@@ -204,6 +204,16 @@ var DepositWidget = function (_Component) {
204
204
  }
205
205
 
206
206
  _createClass(DepositWidget, [{
207
+ key: 'componentDidUpdate',
208
+ value: function componentDidUpdate(prevProps) {
209
+ // Update state when the bonus code updates in props
210
+ if (this.props.bonusCode !== prevProps.bonusCode) {
211
+ this.setState({
212
+ bonusCode: this.props.bonusCode
213
+ });
214
+ }
215
+ }
216
+ }, {
207
217
  key: 'render',
208
218
  value: function render() {
209
219
  var _this2 = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -76,5 +76,5 @@
76
76
  "webpack": "^3.0.0",
77
77
  "webpack-blocks": "^1.0.0"
78
78
  },
79
- "gitHead": "747e8f43202add17f5cf667c5d4cfa9834c70bdf"
79
+ "gitHead": "e01bb3d78b9d6f1330b58b32be9a0a3a87b98c42"
80
80
  }