This commit is contained in:
lingdocs 2021-09-18 23:58:25 -04:00
parent ccac58e5eb
commit 17212a989a
2 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,7 @@ function GameCore<T>({ questions, Display, timeLimit, Instructions, studyLink, i
id,
};
console.log("will post result", JSON.stringify(result));
// TODO: Check not showing up - should show up immediately whether online or not
postTestResults([result])
.then((res) => {
if (res.ok) {

View File

@ -4,6 +4,7 @@ import { useUser } from "../user-context";
function GameDisplay({ record: { title, Game, id } }: { record: GameRecord }) {
const { user } = useUser();
const completed = user?.tests.some((t) => (
// TODO: Or if it's in the locally stored (unposted test results)
(t.done === true) && (t.id === id)
));
return <div>