File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ export const VoronoiCell = ({
4848 data,
4949 } ;
5050
51- tooltipState . distanceFromTop =
52- tooltipState . cursorY + margin . top ;
51+ tooltipState . distanceFromTop = tooltipState . cursorY + margin . top ;
5352 tooltipState . distanceFromRight =
5453 width - ( margin . left + tooltipState . cursorX ) ;
5554 tooltipState . distanceFromLeft = margin . left + tooltipState . cursorX ;
Original file line number Diff line number Diff line change 11import { useState , useEffect } from 'react' ;
22
3-
43export default function useWindowDimensions ( ) {
5- const [ windowDimensions , setWindowDimensions ] = useState (
6- { width : 0 , height : 0 }
7- ) ;
4+ const [ windowDimensions , setWindowDimensions ] = useState ( {
5+ width : 0 ,
6+ height : 0 ,
7+ } ) ;
88
99 useEffect ( ( ) => {
1010 function getWindowDimensions ( ) {
@@ -17,7 +17,7 @@ export default function useWindowDimensions() {
1717 function handleResize ( ) {
1818 setWindowDimensions ( getWindowDimensions ( ) ) ;
1919 }
20- handleResize ( )
20+ handleResize ( ) ;
2121
2222 window . addEventListener ( 'resize' , handleResize ) ;
2323 return ( ) => window . removeEventListener ( 'resize' , handleResize ) ;
You can’t perform that action at this time.
0 commit comments