File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,10 @@ then put the component inside render
75
75
import package
76
76
77
77
``` javascript
78
- import {Confetti , fetchConfettiFromFirebase } from ' @hyperjumptech/react-native-confetti' ;
78
+ import {
79
+ Confetti ,
80
+ fetchConfettiFromFirebase ,
81
+ } from ' @hyperjumptech/react-native-confetti' ;
79
82
```
80
83
81
84
define state to hold the parameters
@@ -103,7 +106,14 @@ const keys = [
103
106
' confetti_image_name' ,
104
107
];
105
108
106
- fetchConfetti (keys).then ((confetti ) => {
109
+ fetchConfetti (keys).then ((data ) => {
110
+ const confetti = {
111
+ confetti_type: data .confetti_type ,
112
+ confetti_color: data .confetti_color ,
113
+ confetti_character: data .confetti_character ,
114
+ confetti_enabled: data .confetti_enabled === ' 1' ? true : false ,
115
+ confetti_image_name: data .confetti_image_name ,
116
+ };
107
117
this .setState ({confetti});
108
118
});
109
119
```
@@ -183,7 +193,6 @@ To test, run `npm run test` or `yarn test`
183
193
184
194
To see the running demo, you can run the example app with these steps:
185
195
186
-
187
196
1 . change directory to ` example `
188
197
189
198
```
You can’t perform that action at this time.
0 commit comments