import {BrowserRouter, Route, Switch} from 'react-router-dom';
import Home from './components/home';
import RobotPage from './components/robot/robotPage';
import ManufacturerPage from './components/manufacturer/manufacturerPage';
import CategoryPage from './components/category/categoryPage';
import {Container} from 'react-bootstrap';
import Login from './components/login/login';
import useJWT from './hooks/useJWT';
import NavBar from './components/navbar/navbar';

const Main = () => {
    return (
        <Switch>
            <Route exact path='/' component={Home}/>
            <Route path='/robots' component={RobotPage}/>
            <Route path='/manufactures' component={ManufacturerPage}/>
            <Route path='/categories' component={CategoryPage}/>
            <Route path='/login' component={Login}/>
        </Switch>
    )
}

const App = () => {

    return (
        <BrowserRouter>
            <NavBar/>
            <Container>
                <Main/>
            </Container>
        </BrowserRouter>
    );
};

export default App;
