import React, { useState } from "react";
import ReactDOM from "react-dom";
import { HashRouter, Route, Switch, withRouter } from "react-router-dom";
import "react-toastify/dist/ReactToastify.css";
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/
// any CSS you import will output into a single css file (app.css in this case)
import "../css/app.css";
import NavBar from "./components/Navbar";
import PrivateRoute from "./components/PrivateRoute";
import AuthContext from "./contexts/AuthContext";
import CustomerPage from "./pages/CustomerPage";
import CustomersPage from "./pages/CustomersPage";
import HomePage from "./pages/HomePage";
import InvoicePage from "./pages/InvoicePage";
import InvoicesPage from "./pages/InvoicesPage";
import LoginPage from "./pages/LoginPage";
import RegisterPage from "./pages/RegisterPage";
import AuthAPI from "./services/AuthAPI";
import { ToastContainer, toast } from "react-toastify";
// Need jQuery? Install it with "yarn add jquery", then uncomment to import it.
// import $ from 'jquery';
AuthAPI.setup();
const NavBarWithRouter = withRouter(NavBar);
const App = () => {
const [isAuthenticated, setIsAuthenticated] = useState(
AuthAPI.isAuthenticated()
);
const authContext = {
isAuthenticated,
setIsAuthenticated
};
//toast.configure();
return (
<>
>
);
};
const rootElement = document.getElementById("app");
ReactDOM.render(, rootElement);