Skip to content

Commit f741626

Browse files
committed
inline other tab definitions
1 parent 1227135 commit f741626

File tree

3 files changed

+85
-60
lines changed

3 files changed

+85
-60
lines changed

source/views/calendar/index.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,42 @@ const StOlafTab = ({navigation}) =>
1717
navigation={navigation}
1818
calendarId="[email protected]"
1919
/>
20-
StOlafTab.navigationOptions = {
21-
tabBarLabel: 'St. Olaf',
22-
tabBarIcon: TabBarIcon('school'),
23-
}
2420

2521
const OlevilleTab = ({navigation}) =>
2622
<GoogleCalendarView
2723
navigation={navigation}
2824
calendarId="[email protected]"
2925
/>
30-
OlevilleTab.navigationOptions = {
31-
tabBarLabel: 'Oleville',
32-
tabBarIcon: TabBarIcon('happy'),
33-
}
3426

3527
const NorthfieldTab = ({navigation}) =>
3628
<GoogleCalendarView
3729
navigation={navigation}
3830
calendarId="[email protected]"
3931
/>
40-
NorthfieldTab.navigationOptions = {
41-
tabBarLabel: 'Northfield',
42-
tabBarIcon: TabBarIcon('pin'),
43-
}
4432

4533
export default TabNavigator(
4634
{
47-
StOlafCalendarView: {screen: StOlafTab},
48-
OlevilleCalendarView: {screen: OlevilleTab},
49-
NorthfieldCalendarView: {screen: NorthfieldTab},
35+
StOlafCalendarView: {
36+
screen: StOlafTab,
37+
navigationOptions: {
38+
tabBarLabel: 'St. Olaf',
39+
tabBarIcon: TabBarIcon('school'),
40+
},
41+
},
42+
OlevilleCalendarView: {
43+
screen: OlevilleTab,
44+
navigationOptions: {
45+
tabBarLabel: 'Oleville',
46+
tabBarIcon: TabBarIcon('happy'),
47+
},
48+
},
49+
NorthfieldCalendarView: {
50+
screen: NorthfieldTab,
51+
navigationOptions: {
52+
tabBarLabel: 'Northfield',
53+
tabBarIcon: TabBarIcon('pin'),
54+
},
55+
},
5056
},
5157
{
5258
navigationOptions: {

source/views/news/index.js

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ const StOlafTab = ({navigation}) =>
1919
query={{per_page: 10, _embed: true}}
2020
name="St. Olaf"
2121
/>
22-
StOlafTab.navigationOptions = {
23-
tabBarLabel: 'St. Olaf',
24-
tabBarIcon: TabBarIcon('school'),
25-
}
2622

2723
const OlevilleTab = ({navigation}) =>
2824
<NewsContainer
@@ -33,10 +29,6 @@ const OlevilleTab = ({navigation}) =>
3329
embedFeaturedImage={true}
3430
name="Oleville"
3531
/>
36-
OlevilleTab.navigationOptions = {
37-
tabBarLabel: 'Oleville',
38-
tabBarIcon: TabBarIcon('happy'),
39-
}
4032

4133
const MessTab = ({navigation}) =>
4234
<NewsContainer
@@ -45,10 +37,6 @@ const MessTab = ({navigation}) =>
4537
url="http://manitoumessenger.com/feed/"
4638
name="The Mess"
4739
/>
48-
MessTab.navigationOptions = {
49-
tabBarLabel: 'The Mess',
50-
tabBarIcon: TabBarIcon('paper'),
51-
}
5240

5341
const PoliticOleTab = ({navigation}) =>
5442
<NewsContainer
@@ -57,10 +45,6 @@ const PoliticOleTab = ({navigation}) =>
5745
url="http://oleville.com/politicole/feed/"
5846
name="PoliticOle"
5947
/>
60-
PoliticOleTab.navigationOptions = {
61-
tabBarLabel: 'PoliticOle',
62-
tabBarIcon: TabBarIcon('megaphone'),
63-
}
6448

6549
const KstoTab = ({navigation}) =>
6650
<NewsContainer
@@ -70,18 +54,44 @@ const KstoTab = ({navigation}) =>
7054
query={{per_page: 10, _embed: true}}
7155
name="KSTO"
7256
/>
73-
KstoTab.navigationOptions = {
74-
tabBarLabel: 'KSTO',
75-
tabBarIcon: TabBarIcon('radio'),
76-
}
7757

7858
export default TabNavigator(
7959
{
80-
StOlafNewsView: {screen: StOlafTab},
81-
OlevilleNewsView: {screen: OlevilleTab},
82-
MessNewsView: {screen: MessTab},
83-
PoliticOleNewsView: {screen: PoliticOleTab},
84-
KstoNewsView: {screen: KstoTab},
60+
StOlafNewsView: {
61+
screen: StOlafTab,
62+
navigationOptions: {
63+
tabBarLabel: 'St. Olaf',
64+
tabBarIcon: TabBarIcon('school'),
65+
},
66+
},
67+
OlevilleNewsView: {
68+
screen: OlevilleTab,
69+
navigationOptions: {
70+
tabBarLabel: 'Oleville',
71+
tabBarIcon: TabBarIcon('happy'),
72+
},
73+
},
74+
MessNewsView: {
75+
screen: MessTab,
76+
navigationOptions: {
77+
tabBarLabel: 'The Mess',
78+
tabBarIcon: TabBarIcon('paper'),
79+
},
80+
},
81+
PoliticOleNewsView: {
82+
screen: PoliticOleTab,
83+
navigationOptions: {
84+
tabBarLabel: 'PoliticOle',
85+
tabBarIcon: TabBarIcon('megaphone'),
86+
},
87+
},
88+
KstoNewsView: {
89+
screen: KstoTab,
90+
navigationOptions: {
91+
tabBarLabel: 'KSTO',
92+
tabBarIcon: TabBarIcon('radio'),
93+
},
94+
},
8595
},
8696
{
8797
navigationOptions: {

source/views/transportation/index.js

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,44 @@ import OtherModesView from './otherModes'
1313
import BusView from './bus'
1414

1515
const ExpressLineTab = () => <BusView line="Express Bus" />
16-
ExpressLineTab.navigationOptions = {
17-
tabBarLabel: 'Express Bus',
18-
tabBarIcon: TabBarIcon('bus'),
19-
}
2016

2117
const RedLineTab = () => <BusView line="Red Line" />
22-
RedLineTab.navigationOptions = {
23-
tabBarLabel: 'Red Line',
24-
tabBarIcon: TabBarIcon('bus'),
25-
}
2618

2719
const BlueLineTab = () => <BusView line="Blue Line" />
28-
BlueLineTab.navigationOptions = {
29-
tabBarLabel: 'Blue Line',
30-
tabBarIcon: TabBarIcon('bus'),
31-
}
3220

3321
const OtherModesTab = () => <OtherModesView />
34-
OtherModesTab.navigationOptions = {
35-
tabBarLabel: 'Other Modes',
36-
tabBarIcon: TabBarIcon('boat'),
37-
}
3822

3923
export default TabNavigator(
4024
{
41-
ExpressLineBusView: {screen: ExpressLineTab},
42-
RedLineBusView: {screen: RedLineTab},
43-
BlueLineBusView: {screen: BlueLineTab},
44-
TransportationOtherModesListView: {screen: OtherModesTab},
25+
ExpressLineBusView: {
26+
screen: ExpressLineTab,
27+
navigationOptions: {
28+
tabBarLabel: 'Express Bus',
29+
tabBarIcon: TabBarIcon('bus'),
30+
},
31+
},
32+
RedLineBusView: {
33+
screen: RedLineTab,
34+
navigationOptions: {
35+
tabBarLabel: 'Red Line',
36+
tabBarIcon: TabBarIcon('bus'),
37+
},
38+
},
39+
BlueLineBusView: {
40+
screen: BlueLineTab,
41+
42+
navigationOptions: {
43+
tabBarLabel: 'Blue Line',
44+
tabBarIcon: TabBarIcon('bus'),
45+
},
46+
},
47+
TransportationOtherModesListView: {
48+
screen: OtherModesTab,
49+
navigationOptions: {
50+
tabBarLabel: 'Other Modes',
51+
tabBarIcon: TabBarIcon('boat'),
52+
},
53+
},
4554
},
4655
{
4756
navigationOptions: {

0 commit comments

Comments
 (0)