{"size": 951, "ext": "js", "max_stars_repo_path": "eco/src/components/Sidebar/index.js", "max_stars_repo_name": "bigchsta62/AT", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "eco/src/components/Sidebar/index.js", "max_issues_repo_name": "bigchsta62/AT", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "eco/src/components/Sidebar/index.js", "max_forks_repo_name": "bigchsta62/AT", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.1714285714, "max_line_length": 86, "alphanum_fraction": 0.5615141956}
import React from "react";
import { Link, useRouteMatch } from "react-router-dom";
import { AdminSideBar, UserSideBar } from "../console_data/data";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
// import { Button } from "react-bootstrap";
import "./style.css";
// console.log(AdminSideBar);


const Sidebar = () => {
  let { url } = useRouteMatch();

  return (
    // <!-- Sidebar -->
    <div id="sidebar-wrapper">
      
      <div className="list-group list-group-flush">
        {AdminSideBar.map(({ name, id, icon, order }) => (
          <Link
            id={order}
            key={id}
            to={`${url}/${id}`}
            className="list-group-item list-group-item-action text-light bg-dark mb-3"
          >
            <span className="mr-3">{name}</span>
            <FontAwesomeIcon className="float-right" icon={icon} />
          </Link>
        ))}
      </div>
    </div>
  );
};

export default Sidebar;
