chore: normalize line endings

This commit is contained in:
Maze Winther
2026-03-29 15:56:48 +02:00
parent 82817cb50c
commit 4d127a038b
736 changed files with 73880 additions and 73782 deletions
+26 -26
View File
@@ -1,26 +1,26 @@
import { useRef } from "react";
import { useEditor } from "@/hooks/use-editor";
export function useMenuPreview() {
const editor = useEditor();
const didCommitRef = useRef(false);
const discard = () => {
if (!didCommitRef.current && editor.timeline.isPreviewActive()) {
editor.timeline.discardPreview();
}
};
const markCommitted = () => {
didCommitRef.current = true;
};
const onOpenChange = (isOpen: boolean) => {
if (!isOpen) {
discard();
didCommitRef.current = false;
}
};
return { onPointerLeave: discard, onOpenChange, markCommitted };
}
import { useRef } from "react";
import { useEditor } from "@/hooks/use-editor";
export function useMenuPreview() {
const editor = useEditor();
const didCommitRef = useRef(false);
const discard = () => {
if (!didCommitRef.current && editor.timeline.isPreviewActive()) {
editor.timeline.discardPreview();
}
};
const markCommitted = () => {
didCommitRef.current = true;
};
const onOpenChange = (isOpen: boolean) => {
if (!isOpen) {
discard();
didCommitRef.current = false;
}
};
return { onPointerLeave: discard, onOpenChange, markCommitted };
}