@@ -23,29 +23,31 @@ function Button(props) {
23
23
24
24
const [ isDisabled , setIsDisabled ] = useState ( disabled ) ;
25
25
const [ parentIsHovered , setParentIsHovered ] = useState ( false ) ;
26
- const [ longPress , setLongPress ] = useState ( false ) ;
27
- const [ position , setPosition ] = useState ( { x : 0 , y : 0 } ) ;
28
- const longPressTimer = useRef ( null ) ;
26
+ // Stretch Goal
27
+ // const [longPress, setLongPress] = useState(false);
28
+ // const [position, setPosition] = useState({ x: 0, y: 0 });
29
+ // const longPressTimer = useRef(null);
29
30
30
31
const classes = buttonStyles ( ) ;
31
32
const combinedClassName = `${ classes [ className ] } ${ className } ` ;
32
33
33
- const startLongPress = ( ) => {
34
- const x = event . clientX || ( event . touches && event . touches [ 0 ] . clientX ) ;
35
- const y = event . clientY || ( event . touches && event . touches [ 0 ] . clientY ) ;
34
+ // Stretch Goal
35
+ // const startLongPress = () => {
36
+ // const x = event.clientX || (event.touches && event.touches[0].clientX);
37
+ // const y = event.clientY || (event.touches && event.touches[0].clientY);
36
38
37
- setPosition ( { x, y } ) ;
38
- longPressTimer . current = setTimeout ( ( ) => {
39
- setLongPress ( true ) ;
40
- } , 1000 ) ;
41
- }
42
-
43
- const stopLongPress = ( event ) => {
44
- clearTimeout ( longPressTimer . current ) ;
45
- if ( longPress ) {
46
- setLongPress ( false ) ;
47
- }
48
- }
39
+ // setPosition({ x, y });
40
+ // longPressTimer.current = setTimeout(() => {
41
+ // setLongPress(true);
42
+ // }, 1000);
43
+ // }
44
+
45
+ // const stopLongPress = (event) => {
46
+ // clearTimeout(longPressTimer.current);
47
+ // if (longPress) {
48
+ // setLongPress(false);
49
+ // }
50
+ // }
49
51
50
52
return (
51
53
< div
0 commit comments