Skip to content

ModaqControl props

Alejandro edited this page Nov 6, 2021 · 5 revisions

IModaqControlProps

All IModaqControlProps fields are optional.

  • buildVersion: The version you want to show in the Help dialog.
  • customExport: Changes the export options to a single button in the main menu, and calls the onExport method when its clicked. This is passed in as an ICustomExport instance.
  • gameExport: Format-specific rules for the game, such as the number of points per power or if overtime has bonuses. Passed in as an IGameFormat instance.
  • googleClientId: The client ID of the Google application the host uses to connect to Google Sheets. This is needed for loading and saving games to TJ Sheets and UCSD Sheets.
  • packet: The packet of questions as an IPacket instance.
  • persistState: Determines if the MODAQ control should persist its state locally between sessions. When users refresh the page, they will see the same packet and teams. This can only be set on the first render. Defaults to true.
  • players: The players in the game. This is passed in as an array of IPlayer.
  • storeName: The name of the localStorage field where the state is stored. State is only stored if persistState isn't set to false.
  • yappServiceUrl: The URL to the Yet Another Packet Parser (YAPP) server, which parses packets in the DOCX format for MODAQ to read. This is needed to read .docx packet files; otherwise, the packet either needs to be passed in through the packet prop, or the user has to choose a pre-parsed packet in the JSON format.

IPacket

  • tossups: An array of ITossup tossup questions.
  • bonuses: An array of IBonus bonus questions. This is optional, since some formats omit bonuses.

IPlayer

  • name: Name of the player. This must be unique per team.
  • teamName: Name of the team. There must be two unique team names in the array of players.
  • isStarter: If the player is in the starting lineup, then set this to true. Set it to false otherwise.
Clone this wiki locally