Skip to content

Commit

Permalink
cahnges
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaLim8 committed Sep 15, 2019
1 parent d46f0fa commit b5c1682
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/src/pages/Results.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Link } from "react-router-dom";
export default class Results extends Component {
constructor(props) {
super(props);
this.state = {percentage: "--"}
this.state = {percentage: "86"}
}

async componentDidMount() {
Expand All @@ -28,10 +28,8 @@ export default class Results extends Component {
body: JSON.stringify(documents), // body data type must match "Content-Type" header
})

console.log("hi");
const json = await response.json();
this.setState({percentage: json.sentiment.documents[0].score*100});
console.log(this.state)
}

render() {
Expand Down

0 comments on commit b5c1682

Please sign in to comment.