Private
Public Access
1
0

chg: dev: change the code style to fit the current standard #4

This commit is contained in:
2026-04-10 12:57:03 +02:00
parent 15806a6e04
commit 086d6c601e
24 changed files with 236 additions and 236 deletions

View File

@@ -175,7 +175,7 @@ class MineSeeker extends React.Component {
// ------------------------------------------------------------------ //
handleMercureMessage(payload) {
let isTopicEvent = 'undefined' !== typeof payload.data;
let isTopicEvent = 'undefined' !== typeof payload.data;
let isNotUnsubscribe = 'undefined' === typeof payload.msg;
if (isTopicEvent) {
@@ -197,9 +197,9 @@ class MineSeeker extends React.Component {
}
openEventSource() {
const wrapper = document.getElementById('mine-wrapper');
const hubUrl = wrapper.dataset.mercureHubUrl;
const subscriberJwt = wrapper.dataset.mercureSubscriberJwt;
const wrapper = document.getElementById('mine-wrapper');
const hubUrl = wrapper.dataset.mercureHubUrl;
const subscriberJwt = wrapper.dataset.mercureSubscriberJwt;
const url = new URL(hubUrl, window.location.origin);
url.searchParams.append('topic', this.state.channel);
@@ -324,8 +324,8 @@ class MineSeeker extends React.Component {
try {
if (this.state.gameInherited) {
/** Fetch existing player info and previously revealed cells */
const resp = await fetch('/api/game/connect/' + this.state.gameAssoc);
const b64 = await resp.text();
const resp = await fetch('/api/game/connect/' + this.state.gameAssoc);
const b64 = await resp.text();
const serverData = JSON.parse(window.atob(b64));
if ('undefined' === typeof serverData.users || null === serverData.users) {
@@ -393,7 +393,7 @@ class MineSeeker extends React.Component {
let dataPack = {
coords: coords,
player: activePlayer,
bomb: this.refs.gridControl.refs.userControl.state.bombSelected,
bomb: this.refs.gridControl.refs.userControl.state.bombSelected,
resign: null,
};
@@ -403,7 +403,7 @@ class MineSeeker extends React.Component {
}
try {
const resp = await this.publishStep(dataPack);
const resp = await this.publishStep(dataPack);
const result = await resp.json();
this.refs.gridControl.applyStep(result);
@@ -425,4 +425,4 @@ class MineSeeker extends React.Component {
}
}
export default MineSeeker;
export default MineSeeker;