notes
This commit is contained in:
parent
ccac58e5eb
commit
17212a989a
|
@ -57,6 +57,7 @@ function GameCore<T>({ questions, Display, timeLimit, Instructions, studyLink, i
|
||||||
id,
|
id,
|
||||||
};
|
};
|
||||||
console.log("will post result", JSON.stringify(result));
|
console.log("will post result", JSON.stringify(result));
|
||||||
|
// TODO: Check not showing up - should show up immediately whether online or not
|
||||||
postTestResults([result])
|
postTestResults([result])
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useUser } from "../user-context";
|
||||||
function GameDisplay({ record: { title, Game, id } }: { record: GameRecord }) {
|
function GameDisplay({ record: { title, Game, id } }: { record: GameRecord }) {
|
||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
const completed = user?.tests.some((t) => (
|
const completed = user?.tests.some((t) => (
|
||||||
|
// TODO: Or if it's in the locally stored (unposted test results)
|
||||||
(t.done === true) && (t.id === id)
|
(t.done === true) && (t.id === id)
|
||||||
));
|
));
|
||||||
return <div>
|
return <div>
|
||||||
|
|
Loading…
Reference in New Issue