Skip to content

Commit 7c4fa8d

Browse files
committed
move Props/State outside of BalancesView
1 parent 7be2004 commit 7c4fa8d

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

source/views/sis/balances.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,30 @@ const DISCLAIMER = 'This data may be outdated or otherwise inaccurate.'
2727
const LONG_DISCLAIMER =
2828
'This data may be inaccurate.\nBon Appétit is always right.\nThis app is unofficial.'
2929

30-
class BalancesView extends React.Component {
30+
type Props = TopLevelViewPropsType & {
31+
flex: ?number,
32+
ole: ?number,
33+
print: ?number,
34+
weeklyMeals: ?number,
35+
dailyMeals: ?number,
36+
loginState: LoginStateType,
37+
message: ?string,
38+
alertSeen: boolean,
39+
40+
hasSeenAcknowledgement: () => any,
41+
updateBalances: boolean => any,
42+
}
43+
44+
type State = {
45+
loading: boolean,
46+
}
47+
48+
class BalancesView extends React.PureComponent<void, Props, State> {
3149
static navigationOptions = {
3250
tabBarLabel: 'Balances',
3351
tabBarIcon: TabBarIcon('card'),
3452
}
3553

36-
props: TopLevelViewPropsType & {
37-
flex: ?number,
38-
ole: ?number,
39-
print: ?number,
40-
weeklyMeals: ?number,
41-
dailyMeals: ?number,
42-
loginState: LoginStateType,
43-
message: ?string,
44-
alertSeen: boolean,
45-
46-
hasSeenAcknowledgement: () => any,
47-
updateBalances: boolean => any,
48-
}
49-
5054
state = {
5155
loading: false,
5256
}

0 commit comments

Comments
 (0)