mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
more integration tests
This commit is contained in:
parent
4b5f66d497
commit
decebc25c7
192 changed files with 3090 additions and 1657 deletions
|
|
@ -7,27 +7,26 @@ import { createRoot } from 'react-dom/client';
|
|||
import { StyledEngineProvider } from '@mui/material';
|
||||
import { ThemeProvider } from '@mui/material/styles';
|
||||
|
||||
import { WebClient } from '@app/websocket';
|
||||
import { createWebClientResponse, createWebClientRequest } from '@app/api';
|
||||
import { initWebClient } from '@app/api';
|
||||
import { AppShell } from '@app/containers';
|
||||
import { materialTheme } from './material-theme';
|
||||
|
||||
import './i18n';
|
||||
import './index.css';
|
||||
|
||||
function initWebClient() {
|
||||
function useInitWebClient() {
|
||||
const initialized = useRef(false);
|
||||
|
||||
if (!initialized.current) {
|
||||
initialized.current = true;
|
||||
new WebClient(createWebClientResponse(), createWebClientRequest());
|
||||
initWebClient();
|
||||
}
|
||||
}
|
||||
|
||||
const AppWithMaterialTheme = () => {
|
||||
// Instantiate the WebClient singleton before any container renders or any
|
||||
// hook touches WebClient.instance.
|
||||
initWebClient();
|
||||
useInitWebClient();
|
||||
|
||||
return (
|
||||
<StrictMode>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue