You've already forked DataMate
feat: fix the problem in the Operator Market frontend pages
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function useDebouncedEffect(
|
||||
cb: () => void,
|
||||
deps: any[] = [],
|
||||
delay: number = 300
|
||||
) {
|
||||
useEffect(() => {
|
||||
const handler = setTimeout(() => {
|
||||
cb();
|
||||
}, delay);
|
||||
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [...(deps || []), delay]);
|
||||
}
|
||||
import { useEffect } from "react";
|
||||
|
||||
export function useDebouncedEffect(
|
||||
cb: () => void,
|
||||
deps: any[] = [],
|
||||
delay: number = 300
|
||||
) {
|
||||
useEffect(() => {
|
||||
const handler = setTimeout(() => {
|
||||
cb();
|
||||
}, delay);
|
||||
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [...(deps || []), delay]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user