Skip to content

Commit 713d166

Browse files
committed
fix: button click handler parameter types in PlayersAndConnectionsExample
1 parent 371358c commit 713d166

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

examples/apps/PlayersAndConnectionsExample.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { InSim } from 'node-insim';
2-
import type { IS_BTC } from 'node-insim/packets';
2+
import type { InSimPacketInstance, PacketType } from 'node-insim/packets';
33
import { IS_MST, MessageSound } from 'node-insim/packets';
44
import {
55
Button,
@@ -18,7 +18,8 @@ export function PlayersAndConnectionsExample() {
1818
const { sendMessageToConnection, sendMessageToPlayer } = useInSim();
1919

2020
const handlePlayerClick =
21-
(PLID: number) => (packet: IS_BTC, inSim: InSim) => {
21+
(PLID: number) =>
22+
(packet: InSimPacketInstance<PacketType.ISP_BTC>, inSim: InSim) => {
2223
inSim.send(new IS_MST({ Msg: `/echo PLID ${PLID}` }));
2324
sendRaceControlMessageToConnection(
2425
packet.UCID,
@@ -44,7 +45,8 @@ export function PlayersAndConnectionsExample() {
4445
};
4546

4647
const handleConnectionClick =
47-
(UCID: number) => (packet: IS_BTC, inSim: InSim) => {
48+
(UCID: number) =>
49+
(packet: InSimPacketInstance<PacketType.ISP_BTC>, inSim: InSim) => {
4850
inSim.send(new IS_MST({ Msg: `/echo UCID ${UCID}` }));
4951
sendRaceControlMessageToConnection(
5052
packet.UCID,

0 commit comments

Comments
 (0)