{"size": 991, "ext": "js", "max_stars_repo_path": "components/Management/index.js", "max_stars_repo_name": "nikindtmas1/Risika-task", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "components/Management/index.js", "max_issues_repo_name": "nikindtmas1/Risika-task", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "components/Management/index.js", "max_forks_repo_name": "nikindtmas1/Risika-task", "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.5434782609, "max_line_length": 61, "alphanum_fraction": 0.5055499495}
import { setManagementData } from "./utils/setManagementData"
const managementRoles = [
  "MANAGEMENT",
  "ADMINISTRATION",
  "CHIEF EXECUTIVE OFFICER",
  "BOARD OF DIRECTORS",
  "CHAIRMAN",
  "DEPUTY CHAIRMAN",
  "DEPUTY",
  "STAKEHOLDER",
]

const Management = ({ relations }) => {
  const { management, boardOfDirectors } = relations

  const managementData = setManagementData(managementRoles, [
    ...management,
    ...boardOfDirectors,
  ])
  const keys = Object.keys(managementData[0])
  return (
    <div>
      <table>
        <thead>
          <tr>
            {keys.map((key) => (
              <th key={`only keys ${key}`}>{key}</th>
            ))}
          </tr>
        </thead>
        <tbody>
          {managementData.map((data, i) => (
            <tr key={i}>
              {keys.map((key) => (
                <th key={key}>{data[key]}</th>
              ))}
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  )
}

export default Management
