Commit e2e037fb authored by Joakim Hantho Qvale's avatar Joakim Hantho Qvale

#6 merging conflicts

parents 2c3bd734 a7281219
import { SideMenu, List, ListItem } from 'react-native-elements'; //import { SideMenu, List, ListItem } from 'react-native-elements';
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import Filtering from './Filtering' import Filtering from './Filtering'
import React from 'react'; import React from 'react';
import { View, Text } from 'react-native'; import { View, Text } from 'react-native';
import { toggleSideMenu } from "../actions";
import Drawer from 'react-native-drawer'
import { useDispatch } from "react-redux";
const SideMenuComp = () => {
const SideMenu = () => {
const dispatch = useDispatch();
onHamburgerClick = () =>{
dispatch(toggleSideMenu())
}
const stateSideMenu = useSelector(state => state.sideMenu); const stateSideMenu = useSelector(state => state.sideMenu);
return( return(
<SideMenu <View styles={styles.container}>
isOpen={false} <Drawer
menu={stateSideMenu} open={stateSideMenu}
> type="static"
tapToClose={true}
</SideMenu> openDrawerOffset={0.5}
closedDrawerOffset={0}
content={<Filtering/>}
styles={styles.drawerStyle}
tweenHandler={Drawer.tweenPresets.parallax}
tweenEasing={"easeInQuad"}
tweenDuration={400}
onClose={onHamburgerClick}
/>
</View>
) )
} }
export default SideMenuComp; export default SideMenu;
\ No newline at end of file \ No newline at end of file
...@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions"; ...@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions";
const Top = () =>{ const Top = () =>{
const dispatch = useDispatch(); const dispatch = useDispatch();
onHamburgerClick = () =>{
dispatch(toggleSideMenu())
}
return( return(
<Header style={styles.container} <Header style={styles.container}
leftComponent={{ icon: 'menu', color: '#fff'}} leftComponent={{ icon: 'menu', color: '#fff', onPress: () => onHamburgerClick()}}
centerComponent={{ text: 'MY TITLE', style: { color: '#fff' } }} centerComponent={{ text: 'MY TITLE', style: { color: '#fff' } }}
rightComponent={{ icon: 'home', color: '#fff' }} rightComponent={{ icon: 'home', color: '#fff' }}
/> />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment