import React from 'react';
import ReactDOM from 'react-dom';
import 'tailwindcss/tailwind.css';
import {
  BrowserRouter as Router,
  Switch,
  Route
} from 'react-router-dom';
import Header from './components/Header';
import Home from './containers/Home';
import Products from './containers/Products';

const navigation = [
  { name: 'Главная', route: '/'},
  { name: 'Товары', route: '/products'}
];

const App: React.FC = () => (
  <Router>
    <Header navigation={navigation} />
    <Switch>
      <Route exact path="/" component={Home} />
      <Route exact path="/products" component={Products} />
    </Switch>
  </Router>
);

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);
