victor HF Staff commited on
Commit
2c6c947
·
1 Parent(s): 49f34f2

feat: Add resize functionality and logging for breakpoint

Browse files
Files changed (1) hide show
  1. src/components/App.tsx +3 -1
src/components/App.tsx CHANGED
@@ -51,6 +51,7 @@ function App() {
51
  }
52
  };
53
 
 
54
  const handleResize = (e: MouseEvent) => {
55
  if (!editor.current || !preview.current || !resizer.current) return;
56
  const editorWidth = e.clientX;
@@ -60,6 +61,7 @@ function App() {
60
  };
61
 
62
  const handleMouseDown = () => {
 
63
  setIsResizing(true);
64
  document.addEventListener("mousemove", handleResize);
65
  document.addEventListener("mouseup", handleMouseUp);
@@ -85,7 +87,7 @@ function App() {
85
  toast.warn("Previous HTML content restored from local storage.");
86
  }
87
  if (!editor.current || !preview.current) return;
88
-
89
  if (breakpoint === "lg") {
90
  // Set initial sizes
91
  const initialEditorWidth = window.innerWidth / 2;
 
51
  }
52
  };
53
 
54
+
55
  const handleResize = (e: MouseEvent) => {
56
  if (!editor.current || !preview.current || !resizer.current) return;
57
  const editorWidth = e.clientX;
 
61
  };
62
 
63
  const handleMouseDown = () => {
64
+ console.log(breakpoint)
65
  setIsResizing(true);
66
  document.addEventListener("mousemove", handleResize);
67
  document.addEventListener("mouseup", handleMouseUp);
 
87
  toast.warn("Previous HTML content restored from local storage.");
88
  }
89
  if (!editor.current || !preview.current) return;
90
+
91
  if (breakpoint === "lg") {
92
  // Set initial sizes
93
  const initialEditorWidth = window.innerWidth / 2;