diff --git a/src/components/Board.tsx b/src/components/Board.tsx
index eaf831e..3f969c9 100644
--- a/src/components/Board.tsx
+++ b/src/components/Board.tsx
@@ -241,7 +241,7 @@ const Tile = ({
const isFlagged = game.isFlagged[i][j];
const isQuestionMark = game.isQuestionMark[i][j];
const base =
- isRevealed || isMine ? (
+ isRevealed || (isMine && !isFlagged) ? (
) : (
diff --git a/src/components/PastMatch.tsx b/src/components/PastMatch.tsx
index 5c60d41..43a446c 100644
--- a/src/components/PastMatch.tsx
+++ b/src/components/PastMatch.tsx
@@ -1,3 +1,4 @@
+import { Link } from "wouter";
import { ServerGame } from "../../shared/game";
import { formatRelativeTime, formatTimeSpan } from "../../shared/time";
import { Button } from "./Button";
@@ -27,7 +28,10 @@ const PastMatch = ({ game }: PastMatchProps) => {
Duration: {formatTimeSpan(game.finished - game.started)}
-
+ {/* @ts-expect-error as is cheaply typed */}
+
diff --git a/src/main.tsx b/src/main.tsx
index 3036607..56d230d 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -33,7 +33,9 @@ setup().then(() => {
-
+
+ {(params) => }
+
diff --git a/src/views/endless/Endless.tsx b/src/views/endless/Endless.tsx
index b1c7286..19afa3b 100644
--- a/src/views/endless/Endless.tsx
+++ b/src/views/endless/Endless.tsx
@@ -7,7 +7,11 @@ import { Button } from "../../components/Button";
import LeaderboardButton from "../../components/LeaderboardButton";
import { Fragment, useEffect } from "react";
-const Endless = () => {
+interface EndlessProps {
+ gameId?: string;
+}
+
+const Endless: React.FC = (props) => {
const [gameId, setGameId] = useAtom(gameIdAtom);
const { data: game } = useWSQuery("game.getGameState", gameId!, !!gameId);
const { data: settings } = useWSQuery("user.getSettings", null);
@@ -17,11 +21,15 @@ const Endless = () => {
const placeFlag = useWSMutation("game.placeFlag");
const placeQuestionMark = useWSMutation("game.placeQuestionMark");
const clearTile = useWSMutation("game.clearTile");
+
useEffect(() => {
+ if (props.gameId) {
+ setGameId(props.gameId);
+ }
return () => {
setGameId(undefined);
};
- }, [setGameId]);
+ }, [props.gameId, setGameId]);
return game ? (
<>