api ulangan

This commit is contained in:
Samandar Turgunboyev
2025-12-22 19:03:57 +05:00
parent fd397b670b
commit 7f2fe3868b
121 changed files with 12636 additions and 5528 deletions

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
/**
* Hook for closing some items when they are unnecessary to the user
@@ -27,13 +27,13 @@ const useCloser = (
}
}
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener('scroll', handleScroll);
document.addEventListener("mousedown", handleClickOutside);
document.addEventListener("scroll", handleScroll);
return () => {
document.removeEventListener('mousedown', handleClickOutside);
document.removeEventListener('scroll', handleScroll);
document.removeEventListener("mousedown", handleClickOutside);
document.removeEventListener("scroll", handleScroll);
};
}, [ref, closeFunction]);
}, [ref, closeFunction, scrollClose]);
};
export default useCloser;