@sb1/ffe-feedback-react 4.0.21 → 4.0.22

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.
package/es/Animation.js CHANGED
@@ -4,15 +4,14 @@ import highFiveAnimation from './highFiveAnimation';
4
4
  export var Animation = function () {
5
5
  var containerRef = useRef(null);
6
6
  useEffect(function () {
7
- if (containerRef.current) {
8
- lottie.loadAnimation({
9
- container: containerRef.current,
10
- renderer: 'svg',
11
- loop: false,
12
- autoplay: true,
13
- animationData: highFiveAnimation,
14
- });
15
- }
7
+ var instance = lottie.loadAnimation({
8
+ container: containerRef.current,
9
+ renderer: 'svg',
10
+ loop: false,
11
+ autoplay: true,
12
+ animationData: highFiveAnimation,
13
+ });
14
+ return function () { return instance.destroy(); };
16
15
  }, []);
17
16
  return (React.createElement("div", { ref: containerRef, style: { width: '180px', height: '180px' } }));
18
17
  };
package/lib/Animation.js CHANGED
@@ -33,15 +33,14 @@ var highFiveAnimation_1 = __importDefault(require("./highFiveAnimation"));
33
33
  var Animation = function () {
34
34
  var containerRef = (0, react_1.useRef)(null);
35
35
  (0, react_1.useEffect)(function () {
36
- if (containerRef.current) {
37
- lottie_web_1.default.loadAnimation({
38
- container: containerRef.current,
39
- renderer: 'svg',
40
- loop: false,
41
- autoplay: true,
42
- animationData: highFiveAnimation_1.default,
43
- });
44
- }
36
+ var instance = lottie_web_1.default.loadAnimation({
37
+ container: containerRef.current,
38
+ renderer: 'svg',
39
+ loop: false,
40
+ autoplay: true,
41
+ animationData: highFiveAnimation_1.default,
42
+ });
43
+ return function () { return instance.destroy(); };
45
44
  }, []);
46
45
  return (react_1.default.createElement("div", { ref: containerRef, style: { width: '180px', height: '180px' } }));
47
46
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-feedback-react",
3
- "version": "4.0.21",
3
+ "version": "4.0.22",
4
4
  "description": "React component for ffe-feedback",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "9e7c6de56ed486307a17d6c90c3f565c66f94eb1"
49
+ "gitHead": "c6a16b645d478cedb93c4fac213aad083ef0042a"
50
50
  }