From 46eac41021fb7d4d277e406cf38a2523f8ab0fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 26 Oct 2024 23:03:25 +0200 Subject: [PATCH] further formatting --- shared/naturalcrit/splitPane/splitPane.jsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 6d7d0642f..95269aebc 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -27,14 +27,9 @@ const SplitPane = (props)=>{ return ()=>window.removeEventListener('resize', handleResize); }, []); - const limitPosition = (x, min = 1, max = window.innerWidth - 13)=>{ - return Math.round(Math.min(max, Math.max(min, x))); - }; + const limitPosition = (x, min = 1, max = window.innerWidth - 13)=>Math.round(Math.min(max, Math.max(min, x))); - const handleResize = ()=>{ - setDividerPos((pos)=>limitPosition(pos, 0.1 * (window.innerWidth - 13), 0.9 * (window.innerWidth - 13)) - ); - }; + const handleResize = ()=>setDividerPos((pos)=>limitPosition(pos, 0.1 * (window.innerWidth - 13), 0.9 * (window.innerWidth - 13))); const handleUp =(e)=>{ e.preventDefault();