Fix Interface Variable Names

This commit is contained in:
aftabrehan
2024-02-03 20:13:09 +05:00
parent 214ee9dd21
commit 759026d203
11 changed files with 25 additions and 22 deletions

View File

@@ -1,11 +1,11 @@
import { useEffect } from 'react'
interface funcProps {
interface UseClickOutsideProps {
onClick: () => void
ref: { current: HTMLDivElement } | { current: null }
}
export const useClickOutside = ({ onClick, ref }: funcProps) => {
export const useClickOutside = ({ onClick, ref }: UseClickOutsideProps) => {
useEffect(() => {
const handleClickOutside = (e: any) =>
ref.current && !ref.current.contains(e.target) && onClick()