Renamed a few props to be more consistent with component names and for readability

This commit is contained in:
Matthew Marangoni 2016-10-12 13:09:47 -07:00
parent 5c386ceba3
commit 28af2439d1
4 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ export default class AudioSettings extends React.Component {
}
chooseAudio() {
this.props.changeMenu(this.props.CHOOSE_MENU);
this.props.changeMenu(this.props.JOIN_AUDIO);
}

View File

@ -14,9 +14,9 @@ export default class Audio extends React.Component {
constructor(props) {
super(props);
this.CHOOSE_MENU = 0;
this.JOIN_AUDIO = 1;
this.ECHO_TEST = 2;
this.JOIN_AUDIO = 0;
this.AUDIO_SETTINGS = 1;
this.LISTEN_ONLY = 2;
this.submenus = [];
}
@ -40,9 +40,9 @@ export default class Audio extends React.Component {
let props = {
changeMenu: this.changeMenu.bind(this),
CHOOSE_MENU: this.CHOOSE_MENU,
JOIN_AUDIO: this.JOIN_AUDIO,
ECHO_TEST: this.ECHO_TEST,
AUDIO_SETTINGS: this.AUDIO_SETTINGS,
LISTEN_ONLY: this.LISTEN_ONLY,
}
const Submenu = this.submenus[curr].componentName;

View File

@ -20,11 +20,11 @@ export default class JoinAudio extends React.Component {
}
openAudio() {
this.props.changeMenu(this.props.JOIN_AUDIO);
this.props.changeMenu(this.props.AUDIO_SETTINGS);
}
openListen() {
this.props.changeMenu(this.props.ECHO_TEST);
this.props.changeMenu(this.props.LISTEN_ONLY);
}

View File

@ -13,7 +13,7 @@ export default class ListenOnly extends React.Component {
}
chooseAudio() {
this.props.changeMenu(this.props.CHOOSE_MENU);
this.props.changeMenu(this.props.JOIN_AUDIO);
}