add trivia prestart mode

This commit is contained in:
Viktor Rådberg
2024-03-31 12:30:03 +02:00
parent a7b78b8e7a
commit 7696b357b4
4 changed files with 175 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import { GridLayout } from '../Views/Play';
import { FingerGame } from './Games/FingerGame';
import { RandomKingPlayers } from './Games/RandomKing/RandomKingPlayers';
import { RandomKingSelectWrapper } from './Games/RandomKing/RandomKingSelectWrapper';
import { Trivia } from './Games/Trivia';
export const PreStart = ({ gridLayout }: { gridLayout: GridLayout }) => {
const { settings, randomizingPlayer, goToStart } = useGlobalSettings();
@@ -25,6 +26,10 @@ export const PreStart = ({ gridLayout }: { gridLayout: GridLayout }) => {
return <FingerGame />;
}
if (settings.preStartMode === PreStartMode.Trivia) {
return <Trivia />;
}
goToStart();
return null;
};