import React from "react" import { Flex, Text } from "theme-ui" import CodeBox from "./code-box" const EndpointContainer = ({ endpoints }) => { if (!endpoints) return null return ( {endpoints.map((e, i) => { const method = e.method.toUpperCase() const endpoint = e.endpoint return ( {method} {endpoint.replace(/{(.*?)}/g, ":$1")} ) })} ) } export default EndpointContainer