FEATURE Passing a specific id to game container

This commit is contained in:
Nonimart 2025-09-04 11:32:46 +02:00
parent abb584ac32
commit d4ac51700c

View File

@ -52,6 +52,8 @@ export default function GameContainer({ gameId }) {
const gameBackgroundUrl = contextGameDatas.gameBlockDatas.attrs.coverUrl;
const blocks = contextGameDatas.gameBlockDatas.innerBlocks;
const gameContainerId = contextGameDatas.gameId ?? "null";
return (
<>
{/* <ExtraControls /> */}
@ -60,7 +62,9 @@ export default function GameContainer({ gameId }) {
<Timer />
<Help />
<div onMouseDown={handleMouseDown} onMouseMove={handleMouseMove} onMouseUp={handleMouseUp}>
<section className='wp-block-lhoist-blocks-search-and-find lhoist-blocks-search-and-find'>
<section
className='wp-block-lhoist-blocks-search-and-find lhoist-blocks-search-and-find'
id={`game-container-${gameContainerId}`}>
<div className='lhoist-blocks-search-and-find__objects-container'>
<img
className='lhoist-blocks-search-and-find__background_picture'