diff --git a/server/controller.js b/server/controller.js index 3caec70..b0bafa2 100644 --- a/server/controller.js +++ b/server/controller.js @@ -85,9 +85,9 @@ module.exports={ bad: (req, res)=>{ const db = req.app.get('db'); - db.bad({praise: req.body.praise, points: req.body.points}) + db.bad({mean: req.body.mean, points: req.body.points}) .then(bad=>{ - res.status(200).json({praise: bad[0].praise, points: bad[0].points}) + res.status(200).json({mean: bad[0].mean, points: bad[0].points}) }) } } \ No newline at end of file diff --git a/src/components/Home.js b/src/components/Home.js index 2f80a43..b3b3c9c 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -30,13 +30,13 @@ class Login extends Component{ return ; } return( -
+


- - - +

+

+

- Register +

Register
) } diff --git a/src/rooms/RoomEight.js b/src/rooms/RoomEight.js deleted file mode 100644 index 10d94fd..0000000 --- a/src/rooms/RoomEight.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomEight extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 8 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomEight; \ No newline at end of file diff --git a/src/rooms/RoomEighteen.js b/src/rooms/RoomEighteen.js deleted file mode 100644 index c59a784..0000000 --- a/src/rooms/RoomEighteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomEighteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 18 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomEighteen; \ No newline at end of file diff --git a/src/rooms/RoomEleven.js b/src/rooms/RoomEleven.js deleted file mode 100644 index 5c9ca13..0000000 --- a/src/rooms/RoomEleven.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomEleven extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 11 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomEleven; \ No newline at end of file diff --git a/src/rooms/RoomFifteen.js b/src/rooms/RoomFifteen.js deleted file mode 100644 index 0ef4bc8..0000000 --- a/src/rooms/RoomFifteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomFifteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 15 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomFifteen; \ No newline at end of file diff --git a/src/rooms/RoomFive.js b/src/rooms/RoomFive.js deleted file mode 100644 index 6119cf5..0000000 --- a/src/rooms/RoomFive.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomFive extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 5 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomFive; \ No newline at end of file diff --git a/src/rooms/RoomFour.js b/src/rooms/RoomFour.js deleted file mode 100644 index 7cf474e..0000000 --- a/src/rooms/RoomFour.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomFour extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 4 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomFour; \ No newline at end of file diff --git a/src/rooms/RoomFourteen.js b/src/rooms/RoomFourteen.js deleted file mode 100644 index 6271557..0000000 --- a/src/rooms/RoomFourteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomFourteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 14 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomFourteen; \ No newline at end of file diff --git a/src/rooms/RoomNine.js b/src/rooms/RoomNine.js deleted file mode 100644 index 3576b0d..0000000 --- a/src/rooms/RoomNine.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomNine extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 9 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomNine; \ No newline at end of file diff --git a/src/rooms/RoomNineteen.js b/src/rooms/RoomNineteen.js deleted file mode 100644 index 6229621..0000000 --- a/src/rooms/RoomNineteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomNineteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 11 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomNineteen; \ No newline at end of file diff --git a/src/rooms/RoomOne.js b/src/rooms/RoomOne.js index 4b87ae8..171aa6d 100644 --- a/src/rooms/RoomOne.js +++ b/src/rooms/RoomOne.js @@ -11,11 +11,16 @@ class RoomOne extends Component{ question: '', answer: '', isHidden: true, - directionsHidden: true, + hideDirections: true, points: 0, result: '', setting: '', - loading: true + loading: true, + praiseToggle: false, + meanToggle: false, + hideTrueFalse: false, + hideText: false, + display_name: '' }; } @@ -30,7 +35,7 @@ class RoomOne extends Component{ axios .get('/api/rndRoom') .then(response=>{console.log(response) - this.setState({room_id: response.data.room_id, setting: response.data.setting}) + this.setState({room_id: response.data.room_id, setting: response.data.setting, praiseToggle: false, meanToggle: false, hideTrueFalse: false, hideText: true, isHidden: true, question: '', hideDirections: true}) }) event=()=> @@ -44,25 +49,32 @@ class RoomOne extends Component{ axios .get('/api/good') .then(response=>{console.log(response.data) - this.setState({praise: response.data.praise, points: this.state.points + response.data.points}) + this.setState({praise: response.data.praise, points: this.state.points + response.data.points, praiseToggle: true, hideTrueFalse: true, hideDirections: false}, ()=>{ + if(this.state.points == -5) + return('Game Over') + }) }) wrong=()=> axios .get('/api/bad') .then(response=>{console.log(response.data) - this.setState({mean: response.data.mean, points: this.state.points + response.data.points}) + this.setState({mean: response.data.mean, points: this.state.points + response.data.points, meanToggle: true, hideTrueFalse: true, hideDirections: false}, ()=>{ + if(this.state.points == -5) + return('Game Over') + }) }) render(){ return(
+

{this.state.points}



{this.state.setting}

- {this.state.loading && + {!this.state.hideText && this.state.loading &&

An ominous voice enters your mind, "You must face a challenge before the doors in each room will unlock. Answer my questions to proceed, if freedom is what you seek."

}

@@ -72,17 +84,18 @@ class RoomOne extends Component{
{!this.state.isHidden &&
- {this.state.directionsHidden &&} - {this.state.directionsHidden &&} + {!this.state.hideTrueFalse && } + {!this.state.hideTrueFalse && }
}

+ {this.state.praiseToggle ?

{this.state.praise}

: null} + {this.state.meanToggle ?

{this.state.mean}

: null}
- {this.state.directionsHidden &&
- - - -
} + {!this.state.hideDirections &&} + {!this.state.hideDirections &&} + {!this.state.hideDirections &&} +


@@ -91,13 +104,4 @@ class RoomOne extends Component{ } } -const Directions = () => ( - -
- - - -
-) - export default RoomOne; \ No newline at end of file diff --git a/src/rooms/RoomSeven.js b/src/rooms/RoomSeven.js deleted file mode 100644 index 027c94f..0000000 --- a/src/rooms/RoomSeven.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomSeven extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 7 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomSeven; \ No newline at end of file diff --git a/src/rooms/RoomSeventeen.js b/src/rooms/RoomSeventeen.js deleted file mode 100644 index 7e56b16..0000000 --- a/src/rooms/RoomSeventeen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomSeventeen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 8 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomSeventeen; \ No newline at end of file diff --git a/src/rooms/RoomSix.js b/src/rooms/RoomSix.js deleted file mode 100644 index e1cfbd0..0000000 --- a/src/rooms/RoomSix.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomSix extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 6 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomSix; \ No newline at end of file diff --git a/src/rooms/RoomSixteen.js b/src/rooms/RoomSixteen.js deleted file mode 100644 index ee9b770..0000000 --- a/src/rooms/RoomSixteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomSixteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 8 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomSixteen; \ No newline at end of file diff --git a/src/rooms/RoomTen.js b/src/rooms/RoomTen.js deleted file mode 100644 index 6eb7aa8..0000000 --- a/src/rooms/RoomTen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 10 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTen; \ No newline at end of file diff --git a/src/rooms/RoomThirteen.js b/src/rooms/RoomThirteen.js deleted file mode 100644 index 4b2ca34..0000000 --- a/src/rooms/RoomThirteen.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomThirteen extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 13 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomThirteen; \ No newline at end of file diff --git a/src/rooms/RoomThirty.js b/src/rooms/RoomThirty.js deleted file mode 100644 index 960e2ad..0000000 --- a/src/rooms/RoomThirty.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomThirty extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 9 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomThirty; \ No newline at end of file diff --git a/src/rooms/RoomThree.js b/src/rooms/RoomThree.js deleted file mode 100644 index 938cef3..0000000 --- a/src/rooms/RoomThree.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomThree extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 3 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomThree; \ No newline at end of file diff --git a/src/rooms/RoomTwelve.js b/src/rooms/RoomTwelve.js deleted file mode 100644 index 5e0036a..0000000 --- a/src/rooms/RoomTwelve.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwelve extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 12 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwelve; \ No newline at end of file diff --git a/src/rooms/RoomTwenty.js b/src/rooms/RoomTwenty.js deleted file mode 100644 index 1ffb8f3..0000000 --- a/src/rooms/RoomTwenty.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwenty extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 15 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwenty; \ No newline at end of file diff --git a/src/rooms/RoomTwentyEight.js b/src/rooms/RoomTwentyEight.js deleted file mode 100644 index 91a2f0b..0000000 --- a/src/rooms/RoomTwentyEight.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyEight extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 9 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyEight; \ No newline at end of file diff --git a/src/rooms/RoomTwentyFive.js b/src/rooms/RoomTwentyFive.js deleted file mode 100644 index b526d0e..0000000 --- a/src/rooms/RoomTwentyFive.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyFive extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 4 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyFive; \ No newline at end of file diff --git a/src/rooms/RoomTwentyFour.js b/src/rooms/RoomTwentyFour.js deleted file mode 100644 index b923bf9..0000000 --- a/src/rooms/RoomTwentyFour.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyFour extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 4 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyFour; \ No newline at end of file diff --git a/src/rooms/RoomTwentyNine.js b/src/rooms/RoomTwentyNine.js deleted file mode 100644 index 363c107..0000000 --- a/src/rooms/RoomTwentyNine.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyNine extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 9 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyNine; \ No newline at end of file diff --git a/src/rooms/RoomTwentyOne.js b/src/rooms/RoomTwentyOne.js deleted file mode 100644 index 0c6101e..0000000 --- a/src/rooms/RoomTwentyOne.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyOne extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 15 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyOne; \ No newline at end of file diff --git a/src/rooms/RoomTwentySeven.js b/src/rooms/RoomTwentySeven.js deleted file mode 100644 index 9450703..0000000 --- a/src/rooms/RoomTwentySeven.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentySeven extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 14 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentySeven; \ No newline at end of file diff --git a/src/rooms/RoomTwentySix.js b/src/rooms/RoomTwentySix.js deleted file mode 100644 index 9c88305..0000000 --- a/src/rooms/RoomTwentySix.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentySix extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 14 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentySix; \ No newline at end of file diff --git a/src/rooms/RoomTwentyThree.js b/src/rooms/RoomTwentyThree.js deleted file mode 100644 index d2d758d..0000000 --- a/src/rooms/RoomTwentyThree.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyThree extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 5 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyThree; \ No newline at end of file diff --git a/src/rooms/RoomTwentyTwo.js b/src/rooms/RoomTwentyTwo.js deleted file mode 100644 index 51b3176..0000000 --- a/src/rooms/RoomTwentyTwo.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwentyTwo extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 5 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwentyTwo; \ No newline at end of file diff --git a/src/rooms/RoomTwo.js b/src/rooms/RoomTwo.js deleted file mode 100644 index 994d5b4..0000000 --- a/src/rooms/RoomTwo.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, {Component} from 'react'; -import {Link} from 'react-router-dom'; -import {connect} from 'react-redux'; -import axios from 'axios'; - -class RoomTwo extends Component{ - - componentDidMount=(question, answer)=> - axios - .get('/api/events', {question, answer}) - .then(response=>{console.log(response) - this.setState({question: response.data, answer: response.data}) - }) - - render(){ - return( -
-



- Room 2 -





- -
- - - - - - - - - -
-

-
- ) - } -} - -export default RoomTwo; \ No newline at end of file diff --git a/src/router.js b/src/router.js index 7cc64a4..024f09f 100644 --- a/src/router.js +++ b/src/router.js @@ -6,35 +6,6 @@ import Edit from './components/Edit'; import Home from './components/Home'; import Register from './components/Register'; import RoomOne from './rooms/RoomOne'; -import RoomTwo from './rooms/RoomTwo'; -import RoomThree from './rooms/RoomThree'; -import RoomFour from './rooms/RoomFour'; -import RoomFive from './rooms/RoomFive'; -import RoomSix from './rooms/RoomSix'; -import RoomSeven from './rooms/RoomSeven'; -import RoomEight from './rooms/RoomEight'; -import RoomNine from './rooms/RoomNine'; -import RoomTen from './rooms/RoomTen'; -import RoomEleven from './rooms/RoomEleven'; -import RoomTwelve from './rooms/RoomTwelve'; -import RoomThirteen from './rooms/RoomThirteen'; -import RoomFourteen from './rooms/RoomFourteen'; -import RoomFifteen from './rooms/RoomFifteen'; -import RoomSixteen from './rooms/RoomSixteen'; -import RoomSeventeen from './rooms/RoomSeventeen'; -import RoomEighteen from './rooms/RoomEighteen'; -import RoomNineteen from './rooms/RoomNineteen'; -import RoomTwenty from './rooms/RoomTwenty'; -import RoomTwentyOne from './rooms/RoomTwentyOne'; -import RoomTwentyTwo from './rooms/RoomTwentyTwo'; -import RoomTwentyThree from './rooms/RoomTwentyThree'; -import RoomTwentyFour from './rooms/RoomTwentyFour'; -import RoomTwentyFive from './rooms/RoomTwentyFive'; -import RoomTwentySix from './rooms/RoomTwentySix'; -import RoomTwentySeven from './rooms/RoomTwentySeven'; -import RoomTwentyEight from './rooms/RoomTwentyEight'; -import RoomTwentyNine from './rooms/RoomTwentyNine'; -import RoomThirty from './rooms/RoomThirty'; import End from './rooms/End'; export default( @@ -43,38 +14,7 @@ export default( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) \ No newline at end of file