#495 Fix the properties of the StateButton
Merged 6 years ago by abompard. Opened 6 years ago by abompard.
abompard/fedora-hubs fix/statebutton  into  develop

@@ -8,7 +8,6 @@ 

    leave,

    giveUpAdmin,

  } from "../core/actions/hub";

- import StateButton from "./StateButton";

  import "./HubStats.css";

  

  

@@ -76,8 +76,8 @@ 

    turnOnText: PropTypes.string,

    turnOffText: PropTypes.string,

    turnedOnText: PropTypes.string,

-   onTurnOn: PropTypes.func.isRequired,

-   onTurnOff: PropTypes.func.isRequired,

+   onTurnOn: PropTypes.func,

+   onTurnOff: PropTypes.func,

    titleText: PropTypes.string,

    disabled: PropTypes.bool,

  }
@@ -89,6 +89,8 @@ 

    turnOnText: "Turn on",

    turnOffText: "Turn off",

    turnedOnText: "On",

+   onTurnOn: () => null,

+   onTurnOff: () => null,

    titleText: "",

    disabled: false,

  }

The React StateButton properties were incorrect and caused errors to be printed in the console.

rebased onto ea42ed1

6 years ago

Pull-Request has been merged by abompard

6 years ago