🧑‍💻 create button delay helper

This commit is contained in:
2025-07-13 16:21:05 +07:00
parent 0f4bfdfe1c
commit cfd8015cd5
5 changed files with 38 additions and 5 deletions

View File

@ -0,0 +1,11 @@
import { useRouter } from "next/navigation";
export const delayButtonClick = (
router: ReturnType<typeof useRouter>,
href: string,
timeout: number = 300
) => {
setTimeout(() => {
router.push(href);
}, timeout);
};