Update modal open condition
parent
9074fc9aa3
commit
b5c2517f6c
|
@ -43,7 +43,9 @@ class App extends Component {
|
||||||
|
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
pastQuestion: null,
|
||||||
modalIsOpen: false,
|
modalIsOpen: false,
|
||||||
|
pastResponse: null,
|
||||||
start: true,
|
start: true,
|
||||||
score: 0
|
score: 0
|
||||||
});
|
});
|
||||||
|
@ -56,8 +58,7 @@ class App extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleClick(element) {
|
_handleClick(element) {
|
||||||
console.log(element.child +" "+this.state.currentQuestion);
|
if(element.child !== element.question) {
|
||||||
if(element.child !== this.state.currentQuestion || element.child !== null || element.child !== undefined) {
|
|
||||||
this.setState({
|
this.setState({
|
||||||
pastQuestion: this.state.currentQuestion ,
|
pastQuestion: this.state.currentQuestion ,
|
||||||
pastResponse: element.text,
|
pastResponse: element.text,
|
||||||
|
|
Loading…
Reference in New Issue