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 Filtering from './Filtering'
import React from 'react';
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);
return(
<SideMenu
isOpen={false}
menu={stateSideMenu}
>
</SideMenu>
<View styles={styles.container}>
<Drawer
open={stateSideMenu}
type="static"
tapToClose={true}
openDrawerOffset={0.5}
closedDrawerOffset={0}
content={<Filtering/>}
styles={styles.drawerStyle}
tweenHandler={Drawer.tweenPresets.parallax}
tweenEasing={"easeInQuad"}
tweenDuration={400}
onClose={onHamburgerClick}
/>
</View>
)
}
export default SideMenuComp;
\ No newline at end of file
export default SideMenu;
\ No newline at end of file
......@@ -7,10 +7,14 @@ import { toggleSideMenu } from "../actions";
const Top = () =>{
const dispatch = useDispatch();
onHamburgerClick = () =>{
dispatch(toggleSideMenu())
}
return(
<Header style={styles.container}
leftComponent={{ icon: 'menu', color: '#fff'}}
leftComponent={{ icon: 'menu', color: '#fff', onPress: () => onHamburgerClick()}}
centerComponent={{ text: 'MY TITLE', style: { 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