From fa109fd633ed5e79cbb133cb89cb9bd6d3980cd9 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Mon, 22 Nov 2021 16:27:01 +0000 Subject: [PATCH] Fix undo / redo --- apps/www/hooks/useMultiplayerState.ts | 8 ++++---- .../tldraw-example/src/multiplayer/useMultiplayerState.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/www/hooks/useMultiplayerState.ts b/apps/www/hooks/useMultiplayerState.ts index 44ee8bf39..6e0849e9e 100644 --- a/apps/www/hooks/useMultiplayerState.ts +++ b/apps/www/hooks/useMultiplayerState.ts @@ -14,8 +14,8 @@ export function useMultiplayerState(roomId: string) { const rExpectingUpdate = React.useRef(false) const room = useRoom() - const undo = useUndo() - const redo = useRedo() + const onUndo = useUndo() + const onRedo = useRedo() const updateMyPresence = useUpdateMyPresence() // Document Changes -------- @@ -206,8 +206,8 @@ export function useMultiplayerState(roomId: string) { ) return { - undo, - redo, + onUndo, + onRedo, onMount, onChangePage, onChangePresence, diff --git a/examples/tldraw-example/src/multiplayer/useMultiplayerState.ts b/examples/tldraw-example/src/multiplayer/useMultiplayerState.ts index 44ee8bf39..6e0849e9e 100644 --- a/examples/tldraw-example/src/multiplayer/useMultiplayerState.ts +++ b/examples/tldraw-example/src/multiplayer/useMultiplayerState.ts @@ -14,8 +14,8 @@ export function useMultiplayerState(roomId: string) { const rExpectingUpdate = React.useRef(false) const room = useRoom() - const undo = useUndo() - const redo = useRedo() + const onUndo = useUndo() + const onRedo = useRedo() const updateMyPresence = useUpdateMyPresence() // Document Changes -------- @@ -206,8 +206,8 @@ export function useMultiplayerState(roomId: string) { ) return { - undo, - redo, + onUndo, + onRedo, onMount, onChangePage, onChangePresence,