File tree 4 files changed +14
-6
lines changed
4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export default class App extends React.Component {
45
45
// User opened the app via push
46
46
this . navigator &&
47
47
this . navigator . dispatch (
48
- NavigationActions . navigate ( { routeName : data . goToPage , data } )
48
+ NavigationActions . navigate ( { routeName : data . goToPage , params : data } )
49
49
) ;
50
50
// if (this.isFirstTime) {
51
51
// this.isFirstTime = false;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default class Report extends Component {
30
30
} ,
31
31
data : {
32
32
goToPage : "Stats" ,
33
- secret : "Just Kidding! Better Luck Next Time "
33
+ secret : "You are on #1 position for this month "
34
34
}
35
35
} ,
36
36
{
@@ -52,6 +52,9 @@ export default class Report extends Component {
52
52
} ,
53
53
ios : {
54
54
sound : "default"
55
+ } ,
56
+ data : {
57
+ goToPage : "Home"
55
58
}
56
59
} ) ;
57
60
this . scheduleNotification ( ) ;
Original file line number Diff line number Diff line change 1
1
import React , { Component } from "react" ;
2
- import { Text , View } from "react-native" ;
2
+ import { Text , View , Image } from "react-native" ;
3
3
4
4
export default class Stats extends Component {
5
5
static navigationOptions = {
6
6
header : null
7
7
} ;
8
8
render ( ) {
9
9
const { navigation } = this . props ;
10
+ console . log ( navigation , "🚧🚧🚧" ) ;
10
11
const data = navigation . getParam ( "secret" , "No Secret Available" ) ;
11
12
return (
12
- < View style = { { backgroundColor : "000" } } >
13
- < Text style = { { color : "#fff" , fontSize : 36 } } > Stats </ Text >
14
- < Text > The Data from Notifications is { data } </ Text >
13
+ < View style = { { flex : 1 , alignItems : "center" } } >
14
+ < Image
15
+ source = { require ( "../assets/pikapika.jpg" ) }
16
+ style = { { width : 250 , height : 250 } }
17
+ />
18
+ < Text style = { { fontSize : 28 } } > 🌟Your Monthly Stats🌟</ Text >
19
+ < Text style = { { fontSize : 24 , textAlign : "center" } } > { data } </ Text >
15
20
</ View >
16
21
) ;
17
22
}
You can’t perform that action at this time.
0 commit comments