chore: tweak refresh button

This commit is contained in:
Steven
2024-06-01 23:27:35 +08:00
parent 78f6064530
commit 8c0bee3840
3 changed files with 41 additions and 39 deletions

View File

@ -1,3 +1,6 @@
export * from "./useLoading";
export * from "./useCurrentUser";
export * from "./useNavigateTo";
export * from "./useAsyncEffect";
export * from "./useFilterWithUrlParams";
export * from "./useResponsiveWidth";

View File

@ -0,0 +1,9 @@
import { DependencyList, useEffect } from "react";
const useAsyncEffect = (effect: () => void | Promise<void>, deps?: DependencyList): void => {
useEffect(() => {
effect();
}, deps);
};
export default useAsyncEffect;