show more help per proof step

This commit is contained in:
Jon Eugster
2023-07-18 15:25:56 +02:00
parent e5b957e0ec
commit 5b8c9a2e89
6 changed files with 51 additions and 19 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ export function DeletedHint({hint} : {hint: GameHint}) {
</div>
}
export function DeletedHints({hints, showHidden} : {hints: GameHint[], showHidden: boolean}) {
export function DeletedHints({hints} : {hints: GameHint[]}) {
const openHints = hints.filter(hint => !hint.hidden)
const hiddenHints = hints.filter(hint => hint.hidden)
@@ -40,6 +40,6 @@ export function DeletedHints({hints, showHidden} : {hints: GameHint[], showHidde
// TODO: Should not use index as key.
return <>
{openHints.map((hint, i) => <DeletedHint key={`deleted-hint-${i}`} hint={hint} />)}
{showHidden && hiddenHints.map((hint, i) => <DeletedHint key={`deleted-hidden-hint-${i}`} hint={hint}/>)}
{hiddenHints.map((hint, i) => <DeletedHint key={`deleted-hidden-hint-${i}`} hint={hint}/>)}
</>
}