refactor typescript wiring

This commit is contained in:
seavor 2026-04-15 15:46:17 -05:00
parent cea9ae62d8
commit c62c336a11
286 changed files with 2999 additions and 3053 deletions

View file

@ -1,12 +1,17 @@
import { create } from '@bufbuild/protobuf';
import webClient from '../../WebClient';
import { Command_ReplayModifyMatchSchema, Command_ReplayModifyMatch_ext } from 'generated/proto/command_replay_modify_match_pb';
import { SessionPersistence } from '../../persistence';
import { Data } from '@app/types';
export function replayModifyMatch(gameId: number, doNotHide: boolean): void {
webClient.protobuf.sendSessionCommand(Command_ReplayModifyMatch_ext, create(Command_ReplayModifyMatchSchema, { gameId, doNotHide }), {
onSuccess: () => {
SessionPersistence.replayModifyMatch(gameId, doNotHide);
},
});
webClient.protobuf.sendSessionCommand(
Data.Command_ReplayModifyMatch_ext,
create(Data.Command_ReplayModifyMatchSchema, { gameId, doNotHide }),
{
onSuccess: () => {
SessionPersistence.replayModifyMatch(gameId, doNotHide);
},
}
);
}