Skip to content

Commit

Permalink
added results value
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaLim8 committed Sep 15, 2019
1 parent 7328634 commit d46f0fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
18 changes: 6 additions & 12 deletions client/src/pages/Results.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { Component } from 'react';
import "./style.css"
import { CircularProgressbar } from 'react-circular-progressbar';
import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';
import "./style.css"
import Wrapper from "../layout/wrapper.js";
import { Link } from "react-router-dom";

export default class Results extends Component {
constructor(props) {
super(props);
this.state = {percentage: 100}
this.state = {percentage: "--"}
}

async componentDidMount() {
Expand Down Expand Up @@ -39,18 +39,12 @@ export default class Results extends Component {
return (
<Wrapper>
<div className="main">
<div style={{paddingTop: 0, paddingBottom: 20}}>
<div style={{paddingTop: 0, paddingBottom: 15}}>
<h1> Results </h1>
<div className="group">
<div className="vertGroup">
<div style={{width: "50%"}}>
<CircularProgressbar value={this.state.percentage} text={this.state.percentage + "%"} />
</div>
<div className="vertGroup">
<h2> Overall score </h2>
</div>
<div>
<h2> { this.state.percentage + "%" } </h2>
<h2> Common words </h2>
</div>
</div>
</div>
<div style={{padding: 10, right: 5, bottom: 5}}>
Expand Down
13 changes: 13 additions & 0 deletions client/src/pages/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
padding: 10px
}

.CircularProgressbar-path {
stroke: red;
}
.CircularProgressbar-trail {
stroke: gray;
}
.CircularProgressbar-text {
fill: yellow;
}
.CircularProgressbar-background {
fill: green;
}

.group {
display: flex;
flex-direction: row;
Expand Down

0 comments on commit d46f0fa

Please sign in to comment.