diff --git a/static/js/api_endpoint.jsx b/static/js/api_endpoint.jsx index 2014a04b..cbe4dad2 100644 --- a/static/js/api_endpoint.jsx +++ b/static/js/api_endpoint.jsx @@ -3,45 +3,27 @@ import React from 'react'; // Styles for this element is defined in src/css/custom.css export default class ApiEndpoint extends React.Component { - constructor(props){ - super(props); - this.state = { - open: false - } - this.toggleInfo = this.toggleInfo.bind(this); - } - - toggleInfo(e){ - this.setState({open: !this.state.open}) - } - render() { return ( -
-
-
+
+ +
{this.props.method}
- {this.props.path} -
- {this.props.unprotected ? ("🔓") : ("🔒")} -
+ {this.props.path} +
+ {this.props.unprotected ? '🔓' : '🔒'}
- {this.state.open ? ( -
- {this.props.children} -
- ): null} -
+ + +
{this.props.children}
+ ); } -} \ No newline at end of file +}