text: /*!
  
  =========================================================
  * Now UI Dashboard React - v1.5.0
  =========================================================
  
  * Product Page: https://www.creative-tim.com/product/now-ui-dashboard-react
  * Copyright 2021 Creative Tim (https://www.creative-tim.com)
  * Licensed under MIT (https://github.com/creativetimofficial/now-ui-dashboard-react/blob/main/LICENSE.md)
  
  * Coded by Creative Tim
  
  =========================================================
  
  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  
  */
  import React, { Fragment } from "react";
  // javascript plugin used to create scrollbars on windows
  import PerfectScrollbar from "perfect-scrollbar";
  
  // reactstrap components
  import { useLocation } from "react-router-dom";
  
  // core components
  import Sidebar from "../components/Sidebar/Sidebar.js";
  import Maps from "../views/Maps";
  import Navbar from "../components/Navbar.js";
  // import "../assets/css/demo.css";
  import "../assets/css/now-ui-dashboard.css";
  
  var ps;
  
  function Admin(props) {
    const location = useLocation();
    const [backgroundColor, setBackgroundColor] = React.useState("black");
    const mainPanel = React.useRef();
    React.useEffect(() => {
      if (navigator.platform.indexOf("Win") > -1) {
        ps = new PerfectScrollbar(mainPanel.current);
        document.body.classList.toggle("perfect-scrollbar-on");
      }
      return function cleanup() {
        if (navigator.platform.indexOf("Win") > -1) {
          ps.destroy();
          document.body.classList.toggle("perfect-scrollbar-on");
        }
      };
    });
    React.useEffect(() => {
      document.documentElement.scrollTop = 0;
      document.scrollingElement.scrollTop = 0;
      mainPanel.current.scrollTop = 0;
    }, [location]);
    const handleColorClick = (color) => {
      setBackgroundColor(color);
    };
    return (
        <div className="wrapper">
          <Sidebar {...props} backgroundColor={backgroundColor}/>
          <div className="main-panel" ref={mainPanel}>
            <Maps/>
          </div>
        </div>
    );
  }
  
  export default Admin;
  