import React, { useState, useEffect } from 'react'; import './Drawer.scss'; import cons from '../../../client/state/cons'; import navigation from '../../../client/state/navigation'; import ScrollView from '../../atoms/scroll/ScrollView'; import DrawerHeader from './DrawerHeader'; import Home from './Home'; import Directs from './Directs'; function DrawerBradcrumb() { return (
{/* TODO: bradcrumb space paths when spaces become a thing */}
); } function Drawer() { const [activeTab, setActiveTab] = useState('home'); function onTabChanged(tabId) { setActiveTab(tabId); } useEffect(() => { navigation.on(cons.events.navigation.TAB_CHANGED, onTabChanged); return () => { navigation.removeListener(cons.events.navigation.TAB_CHANGED, onTabChanged); }; }, []); return (
{ activeTab === 'home' ? : }
); } export default Drawer;