From cf1be2d1730543bd30836a87d9cbdfd2cf48360e Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Tue, 21 Oct 2025 12:08:17 -0500 Subject: [PATCH] fix(homepage): use app-wide abacus config in interactive flashcards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interactive flashcards section at the bottom of the homepage was hardcoding beadShape="circle" instead of respecting the app-wide abacus configuration context that all other abaci on the site use. Changes to InteractiveFlashcards.tsx: - Import useAbacusConfig hook from @soroban/abacus-react - Call useAbacusConfig() in DraggableCard component - Use appConfig.beadShape instead of hardcoded "circle" This ensures visual consistency across all abacus displays on the site and respects user preferences for bead styling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/web/src/components/InteractiveFlashcards.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/InteractiveFlashcards.tsx b/apps/web/src/components/InteractiveFlashcards.tsx index f4b3868e..64481411 100644 --- a/apps/web/src/components/InteractiveFlashcards.tsx +++ b/apps/web/src/components/InteractiveFlashcards.tsx @@ -1,6 +1,6 @@ 'use client' -import { AbacusReact } from '@soroban/abacus-react' +import { AbacusReact, useAbacusConfig } from '@soroban/abacus-react' import { useEffect, useRef, useState } from 'react' import { css } from '../../styled-system/css' @@ -93,6 +93,8 @@ interface DraggableCardProps { } function DraggableCard({ card, containerRef }: DraggableCardProps) { + const appConfig = useAbacusConfig() + // Track position - starts at initial, updates when dragged const [position, setPosition] = useState({ x: card.initialX, y: card.initialY }) const [rotation, setRotation] = useState(card.initialRotation) // Now dynamic! @@ -337,7 +339,7 @@ function DraggableCard({ card, containerRef }: DraggableCardProps) { transformOrigin: 'center', })} > - + {/* Number display */}