const CustomDrawerContentComponent = (props) => (
<ScrollView>
<Container style={styles.container}>
<Header style={styles.drawerHeader}>
<Body style={styles.headerBody}>
<Image
ref={(ref) => this.logoImgRef = ref}
style={{ width: 120, height: 120, marginTop:10}}
source={imgLogo}
/>
</Body>
</Header>
<Content>
<DrawerItems {...props}/>
</Content>
</Container>
</ScrollView>
)
const DrMenu= createDrawerNavigator({
"Home": {
navigationOptions: {
drawerIcon: () => (
<Icon name='home'
color='#1976D2' size={26}/>
),
title: i18n.t('home'),
},
screen: (props) => <FLHome {...props} propName={FLHome} {...contactData} />
},
"Active Requests": {
navigationOptions: {
drawerIcon: () => (
<Icon name='comments'
color='#21d90b' size={26}/>
),
title: i18n.t('activeRequests'),
},
screen: (props) => <ActiveRequests {...props} propName={ActiveRequests} />
},
"Accepted Requests": {
navigationOptions: {
drawerIcon: () => (
<Icon name='comments'
color='#00FFFF' size={26}/>
),
title: i18n.t('acceptedRequests'),
},
screen: (props) => <AcceptedRequests {...props} propName={AcceptedRequests} />
},
"Rejected Requests": {
navigationOptions: {
drawerIcon: () => (
<Icon name='comments'
color='#f74747' size={26}/>
),
title: i18n.t('rejectedRequests'),
},
screen: (props) => <RejectedRequests {...props} propName={RejectedRequests} />
},
"Calendar": {
navigationOptions: {
drawerIcon: () => (
<Icon name='calendar'
color='#21d90b' size={26}/>
),
title: i18n.t('calendar'),
},
screen: (props) => <Calender_screen {...props} propName={Calender_screen} />
},
"My Profile": {
navigationOptions: {
drawerIcon: () => (
<Icon name='user'
color='#1976D2' size={26}/>
),
title: i18n.t('myProfile'),
},
screen: (props) => <MyProfile {...props} propName={MyProfile} {...contactData} />
},
"Add/Update Profile": {
navigationOptions: {
drawerIcon: () => (
<Icon name='user'
color='#1976D2' size={26}/>
),
title: i18n.t('addUpdateProfile'),
},
screen: (props) => <TopNavPage {...props} propName={TopNavPage} />
},
"Change Password": {
navigationOptions: {
drawerIcon: () => (
<Icon name='wrench'
color='#1976D2' size={26}/>
),
title: i18n.t('changePassword'),
},
screen: (props) => <ChangePW {...props} propName={ChangePW} />
},
"Contact Us": {
navigationOptions: {
drawerIcon: () => (
<Icon name='address-book'
color='#1976D2' size={26}/>
),
title: i18n.t('contact'),
},
screen: (props) => <ContactUs {...props} propName={ContactUs} />
},
"Logout": {
navigationOptions: {
drawerIcon: () => (
<Icon name='sign-out'
color='#1976D2' size={26}/>
),
title: i18n.t('logout'),
},
screen: (props) => <Logout {...props} propName={Logout} />
},
}, {
initialRouteName: "Home",
drawerPosition: 'left',
contentComponent: CustomDrawerContentComponent,
contentOptions: {
activeTintColor: '#1976D2',
inactiveTintColor :'#1999CE',
activeBackgroundColor :'#E8EAF6',
},
drawerOpenRoute: 'DrawerOpen',
drawerCloseRoute: 'DrawerClose',
}
);
const App = createAppContainer(DrMenu);
return(
<App/>
);
}