Browse Source

fix: Add index to options key in renderer

master
Dale 10 months ago
parent
commit
1546149700
Signed by: Deiru GPG Key ID: AA250C0277B927E1
  1. 4
      src/playback/components/Renderer/Backlog.tsx
  2. 1
      src/test-game/game.tsx

4
src/playback/components/Renderer/Backlog.tsx

@ -67,8 +67,8 @@ const Backlog: FC<Props> = ({ backlog, className, options = [], next, gameOver =
{entry.text}
</li>
))}
{options.map((entry) => (
<OptionItem key={entry.value}>
{options.map((entry, index) => (
<OptionItem key={`${entry.value}-${index}`}>
<a onClick={() => next(entry)}>&gt; {entry.text}</a>
</OptionItem>
))}

1
src/test-game/game.tsx

@ -5,7 +5,6 @@ import nodes from "@/test-game/nodes";
import { DateTime } from "luxon";
import { openCustomScreen, setUI } from "@/engine/store/actions";
import CustomMenu from "./components/Menu";
import { awardSkill } from '@/engine/util/skills';
import reducer, { GameState, setGameUI } from './store';
import { Reducer, AnyAction } from 'redux';

Loading…
Cancel
Save