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