Private
Public Access
1
0

chg: dev: replace webpack w/ vite & remove old, legacy jQuery from the code #4

This commit is contained in:
2026-04-10 21:06:22 +02:00
parent d186a96f0d
commit c660c13ea2
21 changed files with 326 additions and 12177 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import MineSeeker from './mine-seeker/MineSeeker';
const wrapper = document.getElementById('mine-wrapper');

View File

@@ -24,16 +24,6 @@ const useServerCommunication = (gameAssoc, gameInherited, isEnvDev) => {
const rpcUsersRef = useRef(null);
const stepCacheRef = useRef([]);
/** HELPERS */
const correctGridSize = () => {
let $f = $('#mine-wrapper .grid');
$f.height($f.width());
$f = $('#mine-wrapper .grid .field-wrapper');
$f.height($f.width());
$('#mine-wrapper .grid .field-wrapper .field').height($f.width()).css('line-height', ($f.width() - 2) + 'px');
};
/** REST mutations / queries */
const connectQuery = useQuery({
@@ -112,8 +102,6 @@ const useServerCommunication = (gameAssoc, gameInherited, isEnvDev) => {
syncWebPlayer(isBlue ? 'blue' : 'red');
}
900 > $(document).width() && correctGridSize();
if (
2 === payload.userCnt
&& (!connectionLostRef.current