Private
Public Access
1
0
Files
MineSeeker/assets/js/mine-seeker/MineSeeker.jsx

36 lines
989 B
JavaScript

/**
* This file is part of the SplendidBear Websites' projects.
*
* Copyright (c) 2026 @ www.splendidbear.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React, { useRef } from 'react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { GameProvider } from '@mine-contexts';
import { GameBoard } from '@mine-components';
const queryClient = new QueryClient();
const MineSeeker = ({ env, gameId }) => {
const isEnvDev = 'dev' === env;
const gameAssoc = useRef('' !== gameId ? gameId : crypto.randomUUID()).current;
const gameInherited = '' !== gameId;
return (
<QueryClientProvider client={queryClient}>
<GameProvider>
<GameBoard
gameAssoc={gameAssoc}
gameInherited={gameInherited}
isEnvDev={isEnvDev}
/>
</GameProvider>
</QueryClientProvider>
);
};
export default MineSeeker;