瀏覽代碼

Refactor: sidebar drag

yhua1998 1 年之前
父節點
當前提交
28103c901d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/components/sidebar.tsx

+ 1 - 1
app/components/sidebar.tsx

@@ -53,7 +53,7 @@ function useHotKey() {
 }
 }
 
 
 function useDragSideBar() {
 function useDragSideBar() {
-  const limit = useCallback((x: number) => Math.min(MAX_SIDEBAR_WIDTH, x));
+  const limit = (x: number) => Math.min(MAX_SIDEBAR_WIDTH, x);
 
 
   const config = useAppConfig();
   const config = useAppConfig();
   const startX = useRef(0);
   const startX = useRef(0);