fix: fast zap not working
This commit is contained in:
parent
c565dbc993
commit
d954b90bfd
@ -4,7 +4,7 @@ export default function useLoading<T>(fn: ((e: React.MouseEvent) => Promise<T> |
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
|
||||
async function handle(e: React.MouseEvent) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (loading || disabled) return;
|
||||
setLoading(true);
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user