Skip to content

Commit e29c037

Browse files
neyser zananeyser zana
authored andcommitted
makes sure the window buttons toggle correctly
1 parent 20350f9 commit e29c037

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build/webpack-bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/webpack-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/devtools.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ class App extends Component {
132132
console.log(target);
133133
if (this.state.window === 'Graphql' && target.dataset.btn === 'React') {
134134
this.setState({ window: 'React' });
135-
document.querySelector('#reactbtn').classList.remove('active');
136-
document.querySelector('#graphqlbtn').classList.add('active');
137-
} else {
138-
this.setState({ window: 'Graphql' });
139135
document.querySelector('#reactbtn').classList.add('active');
140136
document.querySelector('#graphqlbtn').classList.remove('active');
137+
} else if(this.state.window === 'React' && target.dataset.btn === 'Graphql'){
138+
this.setState({ window: 'Graphql' });
139+
document.querySelector('#reactbtn').classList.remove('active');
140+
document.querySelector('#graphqlbtn').classList.add('active');
141141
}
142142
}
143143

0 commit comments

Comments
 (0)