diff --git a/apps/web/src/app/arcade/matching/context/RoomMemoryPairsProvider.tsx b/apps/web/src/app/arcade/matching/context/RoomMemoryPairsProvider.tsx index 34a35229..c789e63b 100644 --- a/apps/web/src/app/arcade/matching/context/RoomMemoryPairsProvider.tsx +++ b/apps/web/src/app/arcade/matching/context/RoomMemoryPairsProvider.tsx @@ -2,7 +2,7 @@ import { type ReactNode, useCallback, useEffect, useMemo } from 'react' import { useArcadeSession } from '@/hooks/useArcadeSession' -import { useRoomData } from '@/hooks/useRoomData' +import { useRoomData, useUpdateGameConfig } from '@/hooks/useRoomData' import { useViewerId } from '@/hooks/useViewerId' import { buildPlayerMetadata as buildPlayerMetadataUtil, @@ -255,7 +255,7 @@ export function RoomMemoryPairsProvider({ children }: { children: ReactNode }) { if (!gameConfig) return initialState // Get settings for this specific game (matching) - const savedConfig = gameConfig['matching'] as Record | null | undefined + const savedConfig = gameConfig.matching as Record | null | undefined if (!savedConfig) return initialState return { @@ -527,7 +527,7 @@ export function RoomMemoryPairsProvider({ children }: { children: ReactNode }) { // Save setting to room's gameConfig for persistence if (roomData?.id) { const currentGameConfig = (roomData.gameConfig as Record) || {} - const currentMatchingConfig = (currentGameConfig['matching'] as Record) || {} + const currentMatchingConfig = (currentGameConfig.matching as Record) || {} const updatedConfig = { ...currentGameConfig, @@ -558,7 +558,7 @@ export function RoomMemoryPairsProvider({ children }: { children: ReactNode }) { // Save setting to room's gameConfig for persistence if (roomData?.id) { const currentGameConfig = (roomData.gameConfig as Record) || {} - const currentMatchingConfig = (currentGameConfig['matching'] as Record) || {} + const currentMatchingConfig = (currentGameConfig.matching as Record) || {} const updatedConfig = { ...currentGameConfig, @@ -589,7 +589,7 @@ export function RoomMemoryPairsProvider({ children }: { children: ReactNode }) { // Save setting to room's gameConfig for persistence if (roomData?.id) { const currentGameConfig = (roomData.gameConfig as Record) || {} - const currentMatchingConfig = (currentGameConfig['matching'] as Record) || {} + const currentMatchingConfig = (currentGameConfig.matching as Record) || {} const updatedConfig = { ...currentGameConfig,