mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
Fix all comments
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { MutableRefObject, useEffect, useRef } from 'react';
|
||||
|
||||
// Types
|
||||
import { Nullable } from '../globals/types';
|
||||
|
||||
/**
|
||||
* Custom hook to call handler when click outside element
|
||||
@@ -9,7 +12,7 @@ import { useEffect, useRef } from 'react';
|
||||
export const useOutsideClick = (
|
||||
handler: () => void,
|
||||
listeningCapturing = true,
|
||||
): React.MutableRefObject<HTMLUListElement | null> => {
|
||||
): MutableRefObject<Nullable<HTMLUListElement>> => {
|
||||
const ref = useRef<HTMLUListElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user