diff --git a/client/src/components/Binary/Choices_appear.js b/client/src/components/Binary/Choices_appear.js index 761bf50..c4269ef 100644 --- a/client/src/components/Binary/Choices_appear.js +++ b/client/src/components/Binary/Choices_appear.js @@ -1,9 +1,37 @@ import React, { Component } from "react"; import { browserHistory } from "react-router"; +import axios from "axios"; class ChoicesAppear extends Component { + constructor(props) { + super(props); + this.state = { + choices: [] + }; + } + + componentDidMount() { + const id = this.props.match.params.trialId; + axios + .get(`/choices/${id}`) + .then(res => { + this.setState({ choices: res.data }); + }) + .catch(err => { + console.log(err); + }); + } render() { - return
{data.Choices_left}
+{data.Choices_right}
+