garrensmith commented on a change in pull request #947: WIP: Refactor CORS addon
URL: https://github.com/apache/couchdb-fauxton/pull/947#discussion_r131641001
 
 

 ##########
 File path: app/addons/cors/components/CORSScreen.js
 ##########
 @@ -0,0 +1,150 @@
+import React, { Component } from "react";
+import app from "../../../app";
+import ReactComponents from "../../components/react-components";
+import FauxtonComponents from "../../fauxton/components";
+import Origins from "./Origins";
+import OriginInput from "./OriginInput";
+import OriginTable from "./OriginTable";
+
+const LoadLines = ReactComponents.LoadLines;
+const ConfirmationModal = FauxtonComponents.ConfirmationModal;
+
+export default class CORSScreen extends Component {
+
+  constructor (props) {
+    super(props);
+  }
+
+  componentDidMount() {
+    // const { dispatch, url } = this.props;
+    this.props.fetchAndLoadCORSOptions();
+  }
+
+  enableCorsChange () {
+    console.log("CORSScreen.enableCorsChange:", this.props.corsEnabled, 'to', 
!this.props.corsEnabled);
 
 Review comment:
   Its a little neater to rather do this at the begining of the function:
   
   `const {corsEnabled, origins, node} = this.props`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to