Aesthetics
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import NavBar from "./NavBar";
|
import NavBar from "./NavBar";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { ExitToAppRounded as ExitToAppRoundedIcon, HistoryRounded as HistoryRoundedIcon, SettingsRounded as SettingsRoundedIcon, PersonRounded as PersonRoundedIcon, PublicRounded as PublicRoundedIcon, GroupRounded as GroupRoundedIcon, AddRounded as AddRoundedIcon, SwapHorizRounded as SwapHorizRoundedIcon, PeopleRounded as PeopleRoundedIcon, DeleteRounded as DeleteRoundedIcon, QuestionAnswerRounded as QuestionAnswerRoundedIcon } from "@material-ui/icons";
|
import { TimelineRounded as TimelineRoundedIcon, ExitToAppRounded as ExitToAppRoundedIcon, HistoryRounded as HistoryRoundedIcon, SettingsRounded as SettingsRoundedIcon, PersonRounded as PersonRoundedIcon, PublicRounded as PublicRoundedIcon, GroupRounded as GroupRoundedIcon, AddRounded as AddRoundedIcon, SwapHorizRounded as SwapHorizRoundedIcon, PeopleRounded as PeopleRoundedIcon, DeleteRounded as DeleteRoundedIcon, QuestionAnswerRounded as QuestionAnswerRoundedIcon } from "@material-ui/icons";
|
||||||
import Checkbox from '@material-ui/core/Checkbox';
|
import Checkbox from '@material-ui/core/Checkbox';
|
||||||
|
|
||||||
import Xarrow from 'react-xarrows';
|
import Xarrow from 'react-xarrows';
|
||||||
@@ -38,6 +38,13 @@ export default withRouter(class LoggedInHome extends React.Component {
|
|||||||
loading: false,
|
loading: false,
|
||||||
selections: {},
|
selections: {},
|
||||||
navbarItems: [
|
navbarItems: [
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
name: "Mistakes",
|
||||||
|
link: "/history/mistakes",
|
||||||
|
icon: <TimelineRoundedIcon />,
|
||||||
|
hideTextMobile: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
name: "History",
|
name: "History",
|
||||||
@@ -54,7 +61,6 @@ export default withRouter(class LoggedInHome extends React.Component {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "button",
|
type: "button",
|
||||||
name: "Logout",
|
|
||||||
onClick: () => this.props.firebase.auth().signOut(),
|
onClick: () => this.props.firebase.auth().signOut(),
|
||||||
icon: <ExitToAppRoundedIcon />,
|
icon: <ExitToAppRoundedIcon />,
|
||||||
hideTextMobile: true,
|
hideTextMobile: true,
|
||||||
|
|||||||
@@ -132,19 +132,20 @@ export default class IncorrectHistory extends Component {
|
|||||||
<p>mistakes</p>
|
<p>mistakes</p>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
this.state.incorrectAnswers.length > 0 &&
|
this.state.totalTests > 0 &&
|
||||||
<div className="stat-row stat-row--inline">
|
<div className="stat-row stat-row--inline">
|
||||||
<h1>{this.state.incorrectAnswers[0].definition}</h1>
|
<p>average</p>
|
||||||
<p>meaning</p>
|
<h1>{(this.state.totalIncorrect / this.state.totalTests).toFixed(2)}</h1>
|
||||||
<h1>{this.state.incorrectAnswers[0].term}</h1>
|
<p>per test</p>
|
||||||
<p>is the most common</p>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
this.state.totalTests > 0 &&
|
this.state.incorrectAnswers.length > 0 &&
|
||||||
<div className="stat-row stat-row--inline">
|
<div className="stat-row stat-row--inline">
|
||||||
<h1>{(this.state.totalIncorrect / this.state.totalTests).toFixed(2)}</h1>
|
<h1>{this.state.incorrectAnswers[0].term}</h1>
|
||||||
<p>mistakes per test on average</p>
|
<p>meaning</p>
|
||||||
|
<h1>{this.state.incorrectAnswers[0].definition}</h1>
|
||||||
|
<p>is the most common</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -270,10 +270,12 @@ export default withRouter(class Progress extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleAnswerInput = (event) => {
|
handleAnswerInput = (event) => {
|
||||||
|
if (this.state.canProceed) {
|
||||||
this.setState({
|
this.setState({
|
||||||
answerInput: event.target.value,
|
answerInput: event.target.value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
showNextItem = () => {
|
showNextItem = () => {
|
||||||
if (this.state.canProceed) {
|
if (this.state.canProceed) {
|
||||||
|
|||||||
@@ -275,6 +275,8 @@ label .MuiIconButton-label > input {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-row > h1, .stat-row > h2, .stat-row > h3 {
|
.stat-row > h1, .stat-row > h2, .stat-row > h3 {
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ main .button {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 660px) {
|
@media screen and (max-width: 700px) {
|
||||||
.button.button--hide-text-mobile {
|
.button.button--hide-text-mobile {
|
||||||
background: none;
|
background: none;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.mistakes-history-container {
|
.mistakes-history-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-column-gap: 12px;
|
grid-column-gap: 12px;
|
||||||
grid-template-columns: repeat(2, minmax(110px,max-content));
|
grid-template-columns: repeat(2, 1fr);
|
||||||
width: min-content;
|
width: min-content;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ nav {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 660px) {
|
@media screen and (max-width: 700px) {
|
||||||
#banner-logo {
|
#banner-logo {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user