Skip to content

Commit 7c02ab4

Browse files
committedNov 1, 2017
Update flowtypes for React 16. Scaffold out login/register. Move text and some views to RN-ui-lib
1 parent ecb2f42 commit 7c02ab4

37 files changed

+248
-241
lines changed
 

‎.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }], // No, JSX belongs to .js files.
5151
"react/no-unused-prop-types": 0, // going to use Flow types.
5252
"react/jsx-no-undef": 1,
53+
"react/prefer-stateless-function": 0,
5354
"react/prop-types": 0, // Can not detect flowtype correctly.
5455
"react/require-default-props": 0, // Checked by flowtype.
5556
"react/display-name": 0, // todo: turn on and fix

‎src/authentication/components/Login.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import { PageWrapper } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Login extends React.Component {
9+
type LoginProps = {
10+
11+
}
12+
13+
class Login extends React.Component<LoginProps> {
1014
render() {
1115
return (
1216
<PageWrapper
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* # Login.js
3+
* @flow
4+
*/
5+
6+
import { PageWrapper } from '../../common/rl-content-wrappers'
7+
import React from 'react'
8+
9+
type RegisterProps = {
10+
navigator: any,
11+
}
12+
13+
class Register extends React.Component<RegisterProps> {
14+
render() {
15+
return (
16+
<PageWrapper
17+
title="Registration Screen"
18+
text="This is the Registration screen"
19+
/>
20+
)
21+
}
22+
}
23+
24+
export default Register

‎src/authentication/components/Splash.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import { PageWrapper } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Splash extends React.Component {
9+
type SplashProps = {
10+
11+
}
12+
13+
class Splash extends React.Component<SplashProps> {
1014
render() {
1115
return (
1216
<PageWrapper

‎src/authentication/components/Welcome.js

+32-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,45 @@
33
* @flow
44
*/
55

6+
import { Button } from '../../common/rl-style'
7+
import Constants from '../../lib/constants'
68
import { PageWrapper } from '../../common/rl-content-wrappers'
9+
import { View } from 'react-native-ui-lib'
710
import React from 'react'
811

9-
class Welcome extends React.Component {
12+
type WelcomeProps = {
13+
navigator: any,
14+
}
15+
16+
class Welcome extends React.Component<WelcomeProps> {
17+
18+
onPressLogin = () => {
19+
this.props.navigator.push(
20+
{
21+
screen: Constants.Screens.LOGIN_SCREEN.screen,
22+
},
23+
)
24+
}
25+
26+
onPressRegister = () => {
27+
this.props.navigator.push(
28+
{
29+
screen: Constants.Screens.REGISTER_SCREEN.screen,
30+
},
31+
)
32+
}
33+
1034
render() {
1135
return (
1236
<PageWrapper
13-
title="Welcome Screen"
37+
title="Welcome"
1438
text="This is the welcome screen"
15-
/>
39+
>
40+
<View flex bottom>
41+
<Button fullWidth marginB-6 label="Login" onPress={this.onPressLogin} />
42+
<Button background-orange30 marginB-12 fullWidth label="Register" onPress={this.onPressRegister} />
43+
</View>
44+
</PageWrapper>
1645
)
1746
}
1847
}

‎src/authentication/components/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
*/
44

55
import Login from './Login'
6+
import Register from './Register'
67
import Splash from './Splash'
78
import Welcome from './Welcome'
89

910
export {
1011
Login,
12+
Register,
1113
Splash,
1214
Welcome,
1315
}

‎src/authentication/containers/LoginScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import Login from '../components/Login'
77
import NavBar from '../../lib/config/NavBar'
88
import React from 'react'
99

10-
class LoginScreen extends React.Component {
10+
type LoginScreenProps = {
11+
12+
}
13+
14+
class LoginScreen extends React.Component<LoginScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216
render() {
1317
return (
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* # LoginScreen.js
3+
* @flow
4+
*/
5+
6+
import NavBar from '../../lib/config/NavBar'
7+
import React from 'react'
8+
import Register from '../components/Register'
9+
10+
type RegisterScreenProps = {
11+
navigator: any,
12+
}
13+
14+
class LoginScreen extends React.Component<RegisterScreenProps> {
15+
static navigatorStyle = NavBar.Default.style
16+
17+
render() {
18+
return (
19+
<Register
20+
navigator={this.props.navigator}
21+
/>
22+
)
23+
}
24+
}
25+
26+
export default LoginScreen

‎src/authentication/containers/SplashScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import NavBar from '../../lib/config/NavBar'
88
import React from 'react'
99
import Splash from '../components/Splash'
1010

11-
class SplashScreen extends React.Component {
11+
type SplashScreenProps = {
12+
13+
}
14+
15+
class SplashScreen extends React.Component<SplashScreenProps> {
1216
static navigatorStyle = NavBar.Default.style
1317
render() {
1418
return (

‎src/authentication/containers/WelcomeScreen.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ import NavBar from '../../lib/config/NavBar'
77
import React from 'react'
88
import Welcome from '../components/Welcome'
99

10-
class WelcomeScreen extends React.Component {
10+
type WelcomeScreenProps = {
11+
navigator: any,
12+
}
13+
14+
class WelcomeScreen extends React.Component<WelcomeScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216
render() {
1317
return (
14-
<Welcome />
18+
<Welcome
19+
navigator={this.props.navigator}
20+
/>
1521
)
1622
}
1723
}

‎src/authentication/containers/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
*/
44

55
import LoginScreen from './LoginScreen'
6+
import RegisterScreen from './RegisterScreen'
67
import SplashScreen from './SplashScreen'
78
import WelcomeScreen from './WelcomeScreen'
89

910
export {
1011
LoginScreen,
1112
SplashScreen,
13+
RegisterScreen,
1214
WelcomeScreen,
1315
}

‎src/common/rl-content-wrappers/PageWrapper.js

+9-21
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,27 @@
44
*/
55

66
import { Heading1, Paragraph } from '../rl-style'
7-
import { StyleSheet } from 'react-native'
87
import { View } from 'react-native-ui-lib'
98
import React from 'react'
109

1110
type PropsType = {
12-
style?: any,
1311
title?: string,
1412
text?: string,
15-
children?: any
13+
children?: any,
14+
uiProps?: any,
1615
};
1716

18-
const RLPageWrapper = (props: PropsType) => {
19-
const title = props.title && <Heading1 style={styles.title}>{props.title}</Heading1>
17+
const RLPageWrapper = ({ title, text, children, ...other }: PropsType): React$Node => {
18+
const heading = title && <Heading1 marginH-12 marginV-18>{title}</Heading1>
2019
return (
21-
<View flex flex-1 padding-30 paddingT-75>
22-
{title}
23-
<Paragraph style={styles.text}>
24-
{props.text}
20+
<View flex flex-1 {...other}>
21+
{heading}
22+
<Paragraph marginH-12>
23+
{text}
2524
</Paragraph>
26-
{props.children}
25+
{children}
2726
</View>
2827
)
2928
}
3029

31-
const styles = StyleSheet.create({
32-
title: {
33-
textAlign: 'center',
34-
marginBottom: 10,
35-
},
36-
text: {
37-
textAlign: 'center',
38-
marginBottom: 35,
39-
},
40-
})
41-
4230
export default RLPageWrapper

‎src/common/rl-content-wrappers/RLRefreshControl.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
* @flow
33
*/
44

5-
import { Platform, RefreshControl, StyleSheet } from 'react-native'
5+
import { RefreshControl as RNRefreshControl, StyleSheet } from 'react-native'
66

77
import React from 'react'
88

9-
type PropsType = {
10-
refreshAction: (props: any) => Promise<*>
9+
type RefreshControlProps = {
10+
refreshAction: (props: any) => Promise<*>,
1111
};
1212

13-
class AmigoRefreshControl extends React.Component {
14-
props: PropsType;
15-
state: {
16-
refreshing: boolean
17-
}
13+
type RefreshControlState = {
14+
refreshing: boolean,
15+
}
1816

19-
constructor(props: PropsType) {
17+
class RefreshControl extends React.Component<RefreshControlProps, RefreshControlState> {
18+
constructor(props: RefreshControlProps) {
2019
super(props)
2120

2221
this.state = {
@@ -33,7 +32,7 @@ class AmigoRefreshControl extends React.Component {
3332

3433
render() {
3534
return (
36-
<RefreshControl
35+
<RNRefreshControl
3736
// title={'Pull to refresh'}
3837
style={styles.controlBackground}
3938
refreshing={this.state.refreshing}
@@ -50,4 +49,4 @@ const styles = StyleSheet.create({
5049
},
5150
})
5251

53-
export default AmigoRefreshControl
52+
export default RefreshControl

‎src/common/rl-content-wrappers/RLScrollView.js

+4-21
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@ import { ScrollView, StyleSheet } from 'react-native'
77

88
import React from 'react'
99

10-
type PropsType = {
10+
type RLScrollViewProps = {
1111
style?: any,
1212
title?: string,
1313
subtitle?: string,
1414
children?: any
1515
};
1616

17-
const RLScrollView = (props: PropsType) => {
18-
const title
19-
= Boolean(props.title)
20-
&& <PageHeading style={styles.title}>{props.title}</PageHeading>
21-
const subtitle
22-
= Boolean(props.subtitle)
23-
&& <Paragraph style={styles.subtitle}>
24-
{props.subtitle}
25-
</Paragraph>
17+
const RLScrollView = (props: RLScrollViewProps): React$Node => {
18+
const title = !!props.title && <PageHeading>{props.title}</PageHeading>
19+
const subtitle = !!props.subtitle && <Paragraph>{props.subtitle}</Paragraph>
2620
return (
2721
<ScrollView style={[styles.container, props.style]}>
2822
{title}
@@ -36,17 +30,6 @@ const styles = StyleSheet.create({
3630
container: {
3731
flexGrow: 1,
3832
},
39-
title: {
40-
textAlign: 'left',
41-
marginTop: 10,
42-
marginLeft: 5,
43-
marginBottom: 10,
44-
},
45-
subtitle: {
46-
textAlign: 'left',
47-
marginLeft: 5,
48-
marginBottom: 10,
49-
},
5033
})
5134

5235
export default RLScrollView
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* @flow
3+
*/
4+
5+
import { Button as RNButton } from 'react-native-ui-lib'
6+
import React from 'react'
7+
8+
type ButtonProps = {
9+
10+
}
11+
12+
const Button = (props: ButtonProps): React$Node => {
13+
return <RNButton {...props} />
14+
}
15+
16+
export default Button
+19-60
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,40 @@
11
/**
22
* # RLText.js
3-
* @providesModule RLText
3+
* Create some default text styles to re-use
44
* @flow
55
*/
66

7-
import { Text as NativeText, StyleSheet } from 'react-native'
8-
9-
import { normalise } from '../lib/StyleHelpers'
10-
import Colours from '../lib/RLColours'
7+
import { Text as RNText } from 'react-native-ui-lib'
118
import React from 'react'
12-
import env from '../../../env'
139

14-
export function Text({ style, ...props }: Object) {
15-
return <NativeText style={[styles.font, style]} {...props} />
10+
export function Text({ ...props }: Object) {
11+
return <RNText text70 {...props} />
1612
}
1713

18-
export function PageHeading({ style, ...props }: Object) {
19-
return <NativeText style={[styles.font, styles.page, style]} {...props} />
14+
export function PageHeading({ ...props }: Object) {
15+
return <RNText marginV-21 text10 {...props} />
2016
}
2117

22-
export function Heading1({ style, ...props }: Object) {
23-
return <NativeText style={[styles.font, styles.h1, style]} {...props} />
18+
export function Heading1({ ...props }: Object) {
19+
return <RNText text20 {...props} />
2420
}
2521

26-
export function Heading2({ style, ...props }: Object) {
27-
return <NativeText style={[styles.font, styles.h2, style]} {...props} />
22+
export function Heading2({ ...props }: Object) {
23+
return <RNText text30 {...props} />
2824
}
2925

30-
export function Paragraph({ style, ...props }: Object) {
31-
return <NativeText style={[styles.font, styles.p, style]} {...props} />
26+
export function Heading3({ ...props }: Object) {
27+
return <RNText text40 {...props} />
3228
}
3329

34-
export function ErrorText({ style, ...props }: Object) {
35-
return <NativeText style={[styles.font, styles.error, style]} {...props} />
30+
export function Paragraph({ ...props }: Object) {
31+
return <Text marginB-18 {...props} />
3632
}
3733

38-
export function Small({ style, ...props }: Object) {
39-
return <NativeText style={[styles.font, styles.small, style]} {...props} />
34+
export function ErrorText({ ...props }: Object) {
35+
return <RNText text80 {...props} />
4036
}
4137

42-
const styles = StyleSheet.create({
43-
font: {
44-
fontFamily: env.fontFamily,
45-
},
46-
page: {
47-
fontSize: normalise(28),
48-
lineHeight: normalise(34),
49-
color: Colours.darkText,
50-
fontWeight: 'bold',
51-
letterSpacing: -1,
52-
},
53-
h1: {
54-
fontSize: normalise(24),
55-
lineHeight: normalise(27),
56-
color: Colours.darkText,
57-
fontWeight: 'bold',
58-
letterSpacing: -1,
59-
},
60-
h2: {
61-
fontSize: normalise(20),
62-
lineHeight: normalise(27),
63-
color: Colours.darkText,
64-
fontWeight: 'bold',
65-
letterSpacing: -1.4,
66-
},
67-
p: {
68-
fontSize: normalise(15),
69-
lineHeight: normalise(23),
70-
color: Colours.lightText,
71-
},
72-
error: {
73-
fontSize: normalise(14),
74-
lineHeight: normalise(23),
75-
color: 'red',
76-
},
77-
small: {
78-
fontSize: normalise(12),
79-
lineHeight: normalise(20),
80-
},
81-
})
38+
export function Small({ ...props }: Object) {
39+
return <RNText text90 {...props} />
40+
}

‎src/common/rl-style/index.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,5 @@
22
* @flow
33
*/
44

5-
import { ErrorText, Heading1, Heading2, PageHeading, Paragraph, Small, Text } from './components/RLText'
6-
7-
import { normalise } from './lib/StyleHelpers'
8-
import RLColours from './lib/RLColours'
9-
10-
export {
11-
Text,
12-
PageHeading,
13-
Heading1,
14-
Heading2,
15-
Paragraph,
16-
Small,
17-
ErrorText,
18-
RLColours,
19-
normalise,
20-
}
5+
export * from './components/RLText'
6+
export { default as Button } from './components/RLButton'

‎src/common/rl-style/lib/RLColours/index.android.js

-12
This file was deleted.

‎src/common/rl-style/lib/RLColours/index.ios.js

-12
This file was deleted.

‎src/common/rl-style/lib/StyleHelpers.js

-11
This file was deleted.

‎src/env.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
/**
22
* # env.js
3-
* enviroment variables
3+
* JS enviroment variables
44
* @flow
55
*/
66

77
const environment = {
8-
serverUrl: '',
98
version: 1,
109
sandbox: true,
11-
appId: '',
12-
apiKey: '',
13-
fontFamily: undefined,
1410
}
1511

1612
export default environment

‎src/feed/components/Feed.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import { RLScrollView } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Feed extends React.Component {
9+
type FeedProps = {
10+
11+
}
12+
13+
class Feed extends React.Component<FeedProps> {
1014
render() {
1115
return (
1216
<RLScrollView

‎src/feed/components/FeedItem.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
* @flow
44
*/
55

6-
import { Button, StyleSheet, View } from 'react-native'
7-
import { Heading1, Paragraph, RLColours } from '../../common/rl-style'
6+
import { Button, StyleSheet } from 'react-native'
7+
import { Heading1, Paragraph } from '../../common/rl-style'
8+
import { View } from 'react-native-ui-lib'
89

910
import React from 'react'
1011

11-
type FeedItemPropType = {
12+
type FeedItemProps = {
1213
title?: string,
1314
subtitle?: string,
1415
children?: any,
1516
actions?: Array<Function>
1617
};
1718

18-
class FeedItem extends React.Component {
19-
props: FeedItemPropType;
19+
class FeedItem extends React.Component<FeedItemProps> {
2020
renderTitle = () => (
2121
<View style={styles.itemHeader}>
2222
{this.props.title && <Heading1>{this.props.title}</Heading1>}
@@ -38,7 +38,7 @@ class FeedItem extends React.Component {
3838

3939
render() {
4040
return (
41-
<View style={styles.itemContainer}>
41+
<View lightBackground style={styles.itemContainer} >
4242
{this.renderTitle()}
4343
{this.renderContent()}
4444
{this.props.actions && this.renderBottomRow()}
@@ -50,7 +50,6 @@ class FeedItem extends React.Component {
5050
const styles = StyleSheet.create({
5151
itemContainer: {
5252
minHeight: 50,
53-
backgroundColor: RLColours.darkBackground,
5453
},
5554
itemHeader: {
5655
flexDirection: 'row',

‎src/feed/containers/FeedScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import Feed from '../components/Feed'
77
import NavBar from '../../lib/config/NavBar'
88
import React from 'react'
99

10-
class FeedScreen extends React.Component {
10+
type FeedScreenProps = {
11+
12+
}
13+
14+
class FeedScreen extends React.Component<FeedScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216
render() {
1317
return <Feed />

‎src/lib/constants/screens.js

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export default {
4040
screen: 'app.LoginScreen',
4141
title: 'Login',
4242
},
43+
REGISTER_SCREEN: {
44+
screen: 'app.RegisterScreen',
45+
title: 'Register',
46+
},
4347
NEWS_SCREEN: {
4448
screen: 'app.NewsScreen',
4549
title: 'News',

‎src/live/components/Live.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import { RLScrollView } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Live extends React.Component {
9+
type LiveProps = {
10+
11+
}
12+
13+
class Live extends React.Component<LiveProps> {
1014
render() {
1115
return (
1216
<RLScrollView

‎src/live/containers/LiveScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import Live from '../components/Live'
77
import NavBar from '../../lib/config/NavBar'
88
import React from 'react'
99

10-
class LiveScreen extends React.Component {
10+
type LiveScreenProps = {
11+
12+
}
13+
14+
class LiveScreen extends React.Component<LiveScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216
render() {
1317
return (

‎src/news/components/News.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { PageWrapper } from '../../common/rl-content-wrappers'
77
import NavBar from '../../lib/config/NavBar'
88
import React from 'react'
99

10-
class News extends React.Component {
10+
type NewsProps = {
11+
12+
}
13+
14+
class News extends React.Component<NewsProps> {
1115
static navigatorStyle = NavBar.Default.style
1216
render() {
1317
return (

‎src/news/containers/NewsScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import News from '../components/News'
77
import React from 'react'
88

9-
class NewsScreen extends React.Component {
9+
type NewsScreenProps = {
10+
11+
}
12+
13+
class NewsScreen extends React.Component<NewsScreenProps> {
1014
render() {
1115
return (
1216
<News />

‎src/profile/components/Profile.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
import { RLScrollView } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Profile extends React.Component {
9+
type ProfileProps = {
10+
11+
}
12+
13+
class Profile extends React.Component<ProfileProps> {
1014
render() {
1115
return (
1216
<RLScrollView

‎src/profile/containers/ProfileScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import NavBar from '../../lib/config/NavBar'
77
import Profile from '../components/Profile'
88
import React from 'react'
99

10-
class ProfileScreen extends React.Component {
10+
type ProfileScreenProps = {
11+
12+
}
13+
14+
class ProfileScreen extends React.Component<ProfileScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216

1317
render() {

‎src/registerScreens.js

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Constants from './lib/constants'
88
import FeedScreen from './feed/containers/FeedScreen'
99
import LiveScreen from './live/containers/LiveScreen'
1010
import LoginScreen from './authentication/containers/LoginScreen'
11+
import RegisterScreen from './authentication/containers/RegisterScreen'
1112
import NewsScreen from './news/containers/NewsScreen'
1213
import ProfileScreen from './profile/containers/ProfileScreen'
1314
import RankingScreen from './statistics/containers/RankingScreen'
@@ -51,6 +52,12 @@ export function registerScreens(store: {}, Provider: {}) {
5152
store,
5253
Provider,
5354
)
55+
Navigation.registerComponent(
56+
Constants.Screens.REGISTER_SCREEN.screen,
57+
() => RegisterScreen,
58+
store,
59+
Provider,
60+
)
5461
Navigation.registerComponent(
5562
Constants.Screens.SPLASH_SCREEN.screen,
5663
() => SplashScreen,

‎src/setup.js

-44
This file was deleted.

‎src/statistics/components/Ranking.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import { RLScrollView } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Ranking extends React.Component {
9+
type RankingProps = {}
10+
11+
class Ranking extends React.Component<RankingProps> {
1012
render() {
1113
return (
1214
<RLScrollView

‎src/statistics/components/Stats.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import { PageWrapper } from '../../common/rl-content-wrappers'
77
import React from 'react'
88

9-
class Stats extends React.Component {
9+
type StatsProps = {}
10+
11+
class Stats extends React.Component<StatsProps> {
1012
render() {
1113
return (
1214
<PageWrapper

‎src/statistics/containers/RankingScreen.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import NavBar from '../../lib/config/NavBar'
77
import Ranking from '../components/Ranking'
88
import React from 'react'
99

10+
type RankingScreenProps = {
1011

11-
class RankingScreen extends React.Component {
12+
}
13+
14+
class RankingScreen extends React.Component<RankingScreenProps> {
1215
static navigatorStyle = NavBar.Default.style
1316

1417
render() {

‎src/statistics/containers/StatsScreen.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import NavBar from '../../lib/config/NavBar'
77
import React from 'react'
88
import Stats from '../components/Stats'
99

10-
class StatsScreen extends React.Component {
10+
type StatsScreenProps = {
11+
12+
}
13+
14+
class StatsScreen extends React.Component<StatsScreenProps> {
1115
static navigatorStyle = NavBar.Default.style
1216

1317
render() {

0 commit comments

Comments
 (0)
Please sign in to comment.