Browse Source

Fix undo / redo

main
Steve Ruiz 3 years ago
parent
commit
fa109fd633

+ 4
- 4
apps/www/hooks/useMultiplayerState.ts View File

@@ -14,8 +14,8 @@ export function useMultiplayerState(roomId: string) {
14 14
   const rExpectingUpdate = React.useRef(false)
15 15
 
16 16
   const room = useRoom()
17
-  const undo = useUndo()
18
-  const redo = useRedo()
17
+  const onUndo = useUndo()
18
+  const onRedo = useRedo()
19 19
   const updateMyPresence = useUpdateMyPresence()
20 20
 
21 21
   // Document Changes --------
@@ -206,8 +206,8 @@ export function useMultiplayerState(roomId: string) {
206 206
   )
207 207
 
208 208
   return {
209
-    undo,
210
-    redo,
209
+    onUndo,
210
+    onRedo,
211 211
     onMount,
212 212
     onChangePage,
213 213
     onChangePresence,

+ 4
- 4
examples/tldraw-example/src/multiplayer/useMultiplayerState.ts View File

@@ -14,8 +14,8 @@ export function useMultiplayerState(roomId: string) {
14 14
   const rExpectingUpdate = React.useRef(false)
15 15
 
16 16
   const room = useRoom()
17
-  const undo = useUndo()
18
-  const redo = useRedo()
17
+  const onUndo = useUndo()
18
+  const onRedo = useRedo()
19 19
   const updateMyPresence = useUpdateMyPresence()
20 20
 
21 21
   // Document Changes --------
@@ -206,8 +206,8 @@ export function useMultiplayerState(roomId: string) {
206 206
   )
207 207
 
208 208
   return {
209
-    undo,
210
-    redo,
209
+    onUndo,
210
+    onRedo,
211 211
     onMount,
212 212
     onChangePage,
213 213
     onChangePresence,

Loading…
Cancel
Save