import React, { Suspense, lazy } from "react"; import { Switch, Route } from "react-router-dom"; import * as routes from './constants/routes'; import Header from "./containers/Header"; import landingPage from './components/public-components/landingPage'; import Footer from './components/public-components/footer'; import PrivateRouter from './components/common/privateRouter'; import PrivateAdminRouter from './components/common/privateAdminRouter'; import Spinner from "./components/common/spinner"; const notFound = lazy(() => import("./components/public-components/notFound")); // const permissionDenied = lazy(() => import("./components/public-components/permissionDenied")); const homePage = lazy(() => import("./components/user-components/homePage")); const signInPage = lazy(() => import("./containers/auth/SignInPage")); const signUpPage = lazy(() => import("./containers/auth/SignUpPage")); const createTestForm = lazy(() => import("./components/user-components/admin-components/createTestForm")); class Router extends React.Component { checkUserInLocalStorage = () => { // localStorage.getItem(token) } getSomeUsers() { fetch('localhost:3306') .then(res => console.log(res)) .catch(exc => console.warn(exc.message)) } componentDidMount() { this.getSomeUsers(); } render() { return (