Skip to content

Commit adc7d4b

Browse files
committed
Stats Screen styles
1 parent 7876988 commit adc7d4b

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

awesome-app/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class App extends React.Component {
4545
// User opened the app via push
4646
this.navigator &&
4747
this.navigator.dispatch(
48-
NavigationActions.navigate({ routeName: data.goToPage, data })
48+
NavigationActions.navigate({ routeName: data.goToPage, params: data })
4949
);
5050
// if (this.isFirstTime) {
5151
// this.isFirstTime = false;

awesome-app/assets/pikapika.jpg

51.6 KB
Loading

awesome-app/screens/Report.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class Report extends Component {
3030
},
3131
data: {
3232
goToPage: "Stats",
33-
secret: "Just Kidding! Better Luck Next Time"
33+
secret: "You are on #1 position for this month"
3434
}
3535
},
3636
{
@@ -52,6 +52,9 @@ export default class Report extends Component {
5252
},
5353
ios: {
5454
sound: "default"
55+
},
56+
data: {
57+
goToPage: "Home"
5558
}
5659
});
5760
this.scheduleNotification();

awesome-app/screens/Stats.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
import React, { Component } from "react";
2-
import { Text, View } from "react-native";
2+
import { Text, View, Image } from "react-native";
33

44
export default class Stats extends Component {
55
static navigationOptions = {
66
header: null
77
};
88
render() {
99
const { navigation } = this.props;
10+
console.log(navigation, "🚧🚧🚧");
1011
const data = navigation.getParam("secret", "No Secret Available");
1112
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>
1520
</View>
1621
);
1722
}

0 commit comments

Comments
 (0)