fix(rithmomachia): Fix TypeScript errors in playing guide modal

Fix PieceRenderer props and modal scope issues:
- Update PieceRenderer usage to match correct interface (type, color, value, size)
- Move PlayingGuideModal to correct scope within RithmomachiaGame component
- Remove duplicate modal render from ResultsPhase

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-10-31 11:09:36 -05:00
parent 3121d8240a
commit 4834ece98e
2 changed files with 7 additions and 16 deletions

View File

@@ -362,19 +362,10 @@ function PiecesSection() {
>
<svg viewBox="0 0 100 100" width="100%" height="100%">
<PieceRenderer
piece={{
id: `guide-${piece.type}`,
color: 'W',
type: piece.type,
value: piece.type === 'P' ? undefined : 64,
pyramidFaces: piece.type === 'P' ? [64, 49, 36, 25] : undefined,
activePyramidFace: null,
square: 'A1',
captured: false,
}}
x={50}
y={50}
size={35}
type={piece.type}
color="W"
value={piece.type === 'P' ? 'P' : 64}
size={70}
/>
</svg>
</div>

View File

@@ -368,6 +368,9 @@ export function RithmomachiaGame() {
</main>
</div>
</StandardGameLayout>
{/* Playing Guide Modal - persists across all phases */}
<PlayingGuideModal isOpen={isGuideOpen} onClose={() => setIsGuideOpen(false)} />
</PageWithNav>
)
}
@@ -3070,9 +3073,6 @@ function ResultsPhase() {
🚪 Exit
</button>
</div>
{/* Playing Guide Modal - persists across all phases */}
<PlayingGuideModal isOpen={isGuideOpen} onClose={() => setIsGuideOpen(false)} />
</div>
)
}