import Sidebar from './components/sidebar/sidebar.jsx';
import Topbar from './components/topbar/Topbar';
import "./App.css";
import Home from './components/pages/Home/Home.jsx';
import {BrowserRouter as Router , Switch , Route } from "react-router-dom";
import UserList from "../src/components/pages/UserList/UserList.jsx";
import User from "../src/components/pages/User/User.jsx";
import NewUser from "../src/components/pages/newPage/NewUser.jsx";
import ProductList from "../src/components/pages/productList/productList.jsx";
import Product from "../src/components/pages/product/product.jsx";
import NewProduct from "../src/components/pages/newProduct/newProduct.jsx";

function App() {
  return (
    <Router>
    <Topbar />
    <div className="container">
      <Sidebar />
      <Switch>
        <Route exact path="/">
          <Home />
        </Route>
        <Route path="/users">
          <UserList />
        </Route>
        <Route path="/user/:userId">
          <User />
        </Route>
        <Route path="/newUser">
          <NewUser />
        </Route>
        <Route path="/products">
         <ProductList />
        </Route>
        <Route path="/product/:productId">
          <Product />
        </Route>
        <Route path="/newproduct">
          <NewProduct />
        </Route>
      </Switch>
    </div>
  </Router>

  );
}

export default App;
