{"size": 1585, "ext": "js", "max_stars_repo_path": "src/pages/users.js", "max_stars_repo_name": "jvdhtm/coopalladmin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/pages/users.js", "max_issues_repo_name": "jvdhtm/coopalladmin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/pages/users.js", "max_forks_repo_name": "jvdhtm/coopalladmin", "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": 21.7123287671, "max_line_length": 81, "alphanum_fraction": 0.5829652997}
import React from "react"
import Standard from "../components/templates/standard"
import SEO from "../components/atoms/seo/seo"
import Globalcss from "../components/themes/default/global"
import SVGLibrary from "../components/atoms/SVGLibrary"
import UsersAdmin from "../components/organisms/usersAdmin"
import Icon from "../components/atoms/icon"
import { useStaticQuery, graphql } from "gatsby"


const UsersPage = () => {
  const userLists = useStaticQuery(graphql`
  query SiteUserQuery {
    allUsersJson {
      edges {
        node {
          userID
          accountID
          account
          firstName
          lastName
          password
          email
          status
        }
      }
    }
  }`);
  var columns =  [
    {
      Header: "Edit",
      accessor: "edit"
    },
    {
      Header: "First name",
      accessor: "firstName"
    },
    {
      Header: "Last name",
      accessor: "lastName"
    },
    {
      Header: "Account",
      accessor: "account"
    },
    {
      Header: "Status",
      accessor: "status"
    }
  ]
  const data = [];
userLists.allUsersJson.edges.forEach(function (item, key) {
    data[key] = {
        ...item.node,
        edit:<span><Icon icon="edit-pencil" /><Icon icon="trash" /></span>,
        status: <span className={item.node.status}>{item.node.status}</span> 
    };
});
 return(
  <>
  <Globalcss/>
  <SVGLibrary></SVGLibrary>
  <Standard active="Page">
    <SEO title="Page"/>
    <UsersAdmin itemActive={data[1]} items={data} columns={columns}></UsersAdmin>
  </Standard>
  </>
)}

export default UsersPage


