Skip to content

Commit 5b91171

Browse files
committed
Fix type for timeoutRef in useLongPress and update tsconfig formatting
1 parent 3442d92 commit 5b91171

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/tray/social-links.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ interface SocialLinksProps {
1212
}
1313

1414
function useLongPress(callback: () => void, delay: number = 3000) {
15-
const timeoutRef = useRef<NodeJS.Timeout | null>(null)
15+
const timeoutRef = useRef<number | null>(null)
1616

1717
const start = useCallback(() => {
18-
timeoutRef.current = setTimeout(() => {
18+
timeoutRef.current = window.setTimeout(() => {
1919
callback()
2020
}, delay)
2121
}, [callback, delay])

tsconfig.app.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"moduleDetection": "force",
1414
"noEmit": true,
1515
"jsx": "react-jsx",
16-
1716
/* Linting */
1817
"strict": true,
1918
"noUnusedLocals": true,

0 commit comments

Comments
 (0)