mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-20 06:29:32 +02:00
feat: tools normalized
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
/**
|
||||
* The useTimeout function is a custom hook that sets a timeout for a given callback function.
|
||||
@@ -15,7 +15,7 @@ function useTimeout(callback: () => void, delay: number) {
|
||||
useEffect(() => {
|
||||
let timer: NodeJS.Timeout | undefined;
|
||||
|
||||
if (delay !== null && callback && typeof callback === "function") {
|
||||
if (delay !== null && callback && typeof callback === 'function') {
|
||||
timer = setTimeout(callbackRef.current, delay);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user