Skip to content

Commit

Permalink
type change from 'any' to 'event' for improved type safety
Browse files Browse the repository at this point in the history
  • Loading branch information
s2sharpit committed Jun 29, 2023
1 parent c16b7ee commit 9fd8f1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export function MainNav({ items }: MainNavProps) {
const menuRef = useRef<HTMLDivElement>(null);

const handleClose = useCallback(
(e: any) => {
if (menuRef.current && !menuRef.current?.contains(e.target)) {
(e: Event) => {
if (menuRef.current && !menuRef.current?.contains(e.target as Node | null)) {
setToggle(false);
}
},
Expand Down

0 comments on commit 9fd8f1b

Please sign in to comment.