diff --git a/functions/index.js b/functions/index.js index bece0c2..977c07b 100644 --- a/functions/index.js +++ b/functions/index.js @@ -1,7 +1,7 @@ /* eslint-disable indent */ /* eslint-disable no-tabs */ const levenshtein = require('js-levenshtein'); -const functions = require("firebase-functions").region("europe-west2");//.region("europe-west2") +const functions = require("firebase-functions");//.region("europe-west2") const admin = require("firebase-admin"); admin.initializeApp(); const db = admin.firestore(); @@ -611,7 +611,7 @@ exports.processAnswer = functions.https.onCall((data, context) => { currentVocab ); } else { - docData.questions.push(currentVocab); + docData.questions.push(currentVocab); } returnData.totalQuestions = docData.questions.length; returnData.totalIncorrect = docData.incorrect.length; diff --git a/src/App.js b/src/App.js index 34b6787..10d772a 100644 --- a/src/App.js +++ b/src/App.js @@ -53,10 +53,10 @@ appCheck.activate( true ); -// firebase.functions().useEmulator("localhost", 5001); -// firebase.auth().useEmulator("http://localhost:9099"); -// firebase.firestore().useEmulator("localhost", 8080); -const functions = firebase.app().functions("europe-west2");//firebase.functions(); +firebase.functions().useEmulator("localhost", 5001); +firebase.auth().useEmulator("http://localhost:9099"); +firebase.firestore().useEmulator("localhost", 8080); +const functions = firebase.functions();//firebase.app().functions("europe-west2"); const fadeIn = keyframes` from { diff --git a/src/Home.js b/src/Home.js index 7a19656..cdae7cc 100644 --- a/src/Home.js +++ b/src/Home.js @@ -1,10 +1,12 @@ import React, { useEffect } from "react"; import "@material-ui/core"; -import { AccountCircleRounded as AccountCircleIcon } from "@material-ui/icons"; +import { AccountCircleRounded as AccountCircleIcon, ArrowDropDownRounded as ArrowDropDownRoundedIcon } from "@material-ui/icons"; import "./css/Home.css"; import NavBar from './NavBar'; import Footer from "./Footer"; +import Collapsible from "react-collapsible"; + export default function Home(props) { const navbarItems = [ { @@ -41,6 +43,15 @@ export default function Home(props) {
To get started, click login 👆
If you have any feedback, please feel free to email me at parandum@mgrove.uk.
+{vocab}
- )} - > - : + "Correct so far:" + : + "Answers:" + } + + {this.state.currentCorrect.map((vocab, index) => +{vocab}
+ )} + > + : this.state.numberOfAnswers !== null ?