Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 'use client' import dynamic from 'next/dynamic' // Dynamic import breaks webpack's import chain, preventing useRoomData // from being bundled with useUserPlayers in shared chunks const GameModeProviderWithHooks = dynamic( () => import('@/contexts/GameModeProviderWithHooks').then((m) => m.GameModeProviderWithHooks), { ssr: false } ) /** * Games Layout - wrapper for games pages * * Uses GameModeProviderWithHooks which imports the player/room hooks. * This keeps those heavy imports out of GameModeContext.tsx, allowing * practice pages (which don't use this layout) to avoid loading them. */ export default function GamesLayout({ children }: { children: React.ReactNode }) { return <GameModeProviderWithHooks>{children}</GameModeProviderWithHooks> } |