Skip to content

Commit 92ddfe5

Browse files
committed
small change
1 parent 19b0e8c commit 92ddfe5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/web/src/app/(app)/pages/_components/page-editor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export function PageEditor({
2121
debounceTime = 200,
2222
}: PageEditorProps) {
2323
const trpc = useTRPC();
24+
const pendingChangesRef = useRef<BlockTransaction[]>([]);
25+
2426
const { mutate, isPending } = useMutation({
2527
...trpc.blocks.saveTransactions.mutationOptions({}),
2628
onSuccess: () => {
@@ -29,7 +31,7 @@ export function PageEditor({
2931
}
3032
},
3133
});
32-
const pendingChangesRef = useRef<BlockTransaction[]>([]);
34+
3335
const debouncedMutate = useDebouncedCallback(() => {
3436
if (isPending) return;
3537
const transactions = pendingChangesRef.current;

0 commit comments

Comments
 (0)