text: import React from "react";
  import { Switch, Route, Redirect } from "react-router-dom";
  
  // components
  
  import AdminNavbar from "components/Navbars/AdminNavbar.js";
  import Sidebar from "components/Sidebar/Sidebar.js";
  import HeaderStats from "components/Headers/HeaderStats.js";
  import FooterAdmin from "components/Footers/FooterAdmin.js";
  
  // views
  
  import Dashboard from "views/admin/Dashboard.js";
  import Maps from "views/admin/Maps.js";
  import Settings from "views/admin/Settings.js";
  import Tables from "views/admin/Tables.js";
  import CreateCategory from "../views/admin/CreateCategory";
  import CreateCourse from "../views/admin/CreateCourse";
  import CreateChapter from "../views/admin/CreateChapter";
  import UploadCourse from "../views/admin/UploadCourse";
  import CreateUser from "../views/admin/CreateUser";
  import AllotCourses from "../views/admin/AllotCourse";
  import SendEmail from "../views/admin/SendEmail";
  
  export default function Admin() {
    return (
      <>
        <Sidebar />
        <div className="relative md:ml-64 bg-blueGray-100">
          <AdminNavbar />
          {/* Header */}
          <HeaderStats />
          <div className="px-4 md:px-10 mx-auto w-full -m-24">
            <Switch>
              <Route path="/admin/dashboard" exact component={Dashboard} />
              <Route path="/admin/maps" exact component={Maps} />
              <Route path="/admin/profile" exact component={Settings} />
              <Route
                path="/admin/createCategory"
                exact
                component={CreateCategory}
              />
              <Route path="/admin/createCourse" exact component={CreateCourse} />
              <Route
                path="/admin/createChapter"
                exact
                component={CreateChapter}
              />
              <Route path="/admin/uploadCourse" exact component={UploadCourse} />
              <Route path="/admin/createUser" exact component={CreateUser} />
              <Route path="/admin/allotCourse" exact component={AllotCourses} />
              <Route path="/admin/sendEmail" exact component={SendEmail} />
              <Route path="/admin/tables" exact component={Tables} />
              <Redirect from="/admin" to="/admin/dashboard" />
            </Switch>
  
            <FooterAdmin />
          </div>
        </div>
      </>
    );
  }
  