import React from 'react'; import { Route, Switch } from 'react-router'; import ProfileButton from './components/ProfileButton'; import NewsPage from './pages/NewsPage'; import RulesPage from './pages/RulesPage'; const Routes: React.FC = () => ( <Switch> <Route path="/" exact> <ProfileButton /> </Route> <Route path="/news"> <NewsPage /> </Route> <Route path="/rules"> <RulesPage /> </Route> </Switch> ); export default Routes;