/** * @prettier */ import React from "react" import PropTypes from "prop-types" import { List } from "immutable" const Webhooks = ({ specSelectors, getComponent }) => { const operationDTOs = specSelectors.selectWebhooksOperations() const pathItemNames = Object.keys(operationDTOs) const OperationContainer = getComponent("OperationContainer", true) if (pathItemNames.length === 0) return null return (

Webhooks

{pathItemNames.map((pathItemName) => (
{operationDTOs[pathItemName].map((operationDTO) => ( ))}
))}
) } Webhooks.propTypes = { specSelectors: PropTypes.shape({ selectWebhooksOperations: PropTypes.func.isRequired, }).isRequired, getComponent: PropTypes.func.isRequired, } export default Webhooks