File tree 2 files changed +20
-19
lines changed 2 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " pam-react-native" ,
3
- "version" : " 0.1.1 " ,
3
+ "version" : " 0.1.2 " ,
4
4
"description" : " Pam Real CDP SDK" ,
5
5
"source" : " ./src/index.tsx" ,
6
6
"main" : " ./lib/commonjs/index.js" ,
94
94
"peerDependencies" : {
95
95
"@react-native-async-storage/async-storage" : " *" ,
96
96
"react" : " *" ,
97
- "react-native" : " *"
97
+ "react-native" : " *" ,
98
+ "pamtag" : " *"
98
99
},
99
100
"workspaces" : [
100
101
" example"
206
207
},
207
208
"dependencies" : {
208
209
"@react-native-async-storage/async-storage" : " ^2.1.0" ,
209
- "pamtag" : " ../pamtracker.js "
210
+ "pamtag" : " ^1.3.0 "
210
211
}
211
212
}
Original file line number Diff line number Diff line change @@ -67,22 +67,22 @@ export class Pam {
67
67
static async appAttention ( pageName : string ) {
68
68
console . log ( 'appAttention' , pageName ) ;
69
69
70
- const banner = {
71
- title : 'title' ,
72
- description : 'description' ,
73
- image :
74
- 'https://s3-ap-southeast-1.amazonaws.com/pam4-sansiri/ecom/public/2sFQrLjdyBbXkHkAMV03HrNtbhC.jpg' ,
75
- size : 'large' ,
76
- } ;
77
-
78
- PamReactNative . displayPopup ( banner ) ;
79
- // const contectID = Pam._instance.contactState.getContactId();
80
- // const appAttention = await Pam.pamApi.loadAppAttention(pageName, contectID);
81
- // if (appAttention) {
82
- // PamReactNative.displayPopup(appAttention);
83
- // } else {
84
- // console.log('appAttention is undefined');
85
- // }
70
+ // const banner = {
71
+ // title: 'title',
72
+ // description: 'description',
73
+ // image:
74
+ // 'https://s3-ap-southeast-1.amazonaws.com/pam4-sansiri/ecom/public/2sFQrLjdyBbXkHkAMV03HrNtbhC.jpg',
75
+ // size: 'large',
76
+ // };
77
+
78
+ // PamReactNative.displayPopup(banner);
79
+ const contectID = Pam . _instance . contactState . getContactId ( ) ;
80
+ const appAttention = await Pam . pamApi . loadAppAttention ( pageName , contectID ) ;
81
+ if ( appAttention ) {
82
+ PamReactNative . displayPopup ( appAttention ) ;
83
+ } else {
84
+ console . log ( 'appAttention is undefined' ) ;
85
+ }
86
86
}
87
87
88
88
static async track ( event : string , payload : Record < string , any > ) {
You can’t perform that action at this time.
0 commit comments