diff --git a/src/LoggedInHome.js b/src/LoggedInHome.js index 3b570ae..8a3cba2 100644 --- a/src/LoggedInHome.js +++ b/src/LoggedInHome.js @@ -1,7 +1,7 @@ import React from 'react'; import NavBar from "./NavBar"; 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 Xarrow from 'react-xarrows'; @@ -38,6 +38,13 @@ export default withRouter(class LoggedInHome extends React.Component { loading: false, selections: {}, navbarItems: [ + { + type: "link", + name: "Mistakes", + link: "/history/mistakes", + icon: , + hideTextMobile: true, + }, { type: "link", name: "History", @@ -54,7 +61,6 @@ export default withRouter(class LoggedInHome extends React.Component { }, { type: "button", - name: "Logout", onClick: () => this.props.firebase.auth().signOut(), icon: , hideTextMobile: true, diff --git a/src/MistakesHistory.js b/src/MistakesHistory.js index d1001b4..ba9ae50 100644 --- a/src/MistakesHistory.js +++ b/src/MistakesHistory.js @@ -132,19 +132,20 @@ export default class IncorrectHistory extends Component {

mistakes

{ - this.state.incorrectAnswers.length > 0 && + this.state.totalTests > 0 &&
-

{this.state.incorrectAnswers[0].definition}

-

meaning

-

{this.state.incorrectAnswers[0].term}

-

is the most common

+

average

+

{(this.state.totalIncorrect / this.state.totalTests).toFixed(2)}

+

per test

} { - this.state.totalTests > 0 && + this.state.incorrectAnswers.length > 0 &&
-

{(this.state.totalIncorrect / this.state.totalTests).toFixed(2)}

-

mistakes per test on average

+

{this.state.incorrectAnswers[0].term}

+

meaning

+

{this.state.incorrectAnswers[0].definition}

+

is the most common

} diff --git a/src/Progress.js b/src/Progress.js index ec68461..b6ee3f9 100644 --- a/src/Progress.js +++ b/src/Progress.js @@ -270,9 +270,11 @@ export default withRouter(class Progress extends React.Component { } handleAnswerInput = (event) => { - this.setState({ - answerInput: event.target.value, - }); + if (this.state.canProceed) { + this.setState({ + answerInput: event.target.value, + }); + } } showNextItem = () => { diff --git a/src/css/App.css b/src/css/App.css index 4e66254..5aa9a26 100644 --- a/src/css/App.css +++ b/src/css/App.css @@ -275,6 +275,8 @@ label .MuiIconButton-label > input { justify-content: space-between; align-items: baseline; flex-wrap: wrap; + word-wrap: break-word; + word-break: break-word; } .stat-row > h1, .stat-row > h2, .stat-row > h3 { diff --git a/src/css/Button.css b/src/css/Button.css index b8e00a1..be5fa3e 100644 --- a/src/css/Button.css +++ b/src/css/Button.css @@ -82,7 +82,7 @@ main .button { display: none; } -@media screen and (max-width: 660px) { +@media screen and (max-width: 700px) { .button.button--hide-text-mobile { background: none; padding: 10px; diff --git a/src/css/MistakesHistory.css b/src/css/MistakesHistory.css index 76353b9..280c388 100644 --- a/src/css/MistakesHistory.css +++ b/src/css/MistakesHistory.css @@ -1,7 +1,7 @@ .mistakes-history-container { display: grid; grid-column-gap: 12px; - grid-template-columns: repeat(2, minmax(110px,max-content)); + grid-template-columns: repeat(2, 1fr); width: min-content; word-wrap: break-word; word-break: break-word; diff --git a/src/css/NavBar.css b/src/css/NavBar.css index 2112e1c..ebd9a83 100644 --- a/src/css/NavBar.css +++ b/src/css/NavBar.css @@ -24,7 +24,7 @@ nav { justify-content: flex-end; } -@media screen and (max-width: 660px) { +@media screen and (max-width: 700px) { #banner-logo { display: none; }