import MatchGame from 'components/../pages/MatchGame/MatchGame'; import MatchMenu from 'components/../pages/MatchMenu/MatchMenu'; import { useMatchGame } from 'context/MatchGameContext'; import React from 'react'; import Options from 'src/pages/Options/Options'; const AppRoutes = () => { const {currentMenuItem} = useMatchGame(); function getRootComponent () { switch (currentMenuItem) { case 'menu': return ; case 'continue-game': return ; case 'new-game': return ; case 'options': return default: return ; } } return getRootComponent(); }; export default AppRoutes;