From f03f239474422d4250a0c5190b2fc3bb49ecf16f Mon Sep 17 00:00:00 2001 From: Michael Stedman <46408716+recondesigns@users.noreply.github.com> Date: Tue, 5 Mar 2024 01:53:40 -0600 Subject: [PATCH] removed commented code and added default null value to props type --- components/Nav/NavListItem/NavListItem.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/Nav/NavListItem/NavListItem.tsx b/components/Nav/NavListItem/NavListItem.tsx index 6f1a47f77..58eee068c 100644 --- a/components/Nav/NavListItem/NavListItem.tsx +++ b/components/Nav/NavListItem/NavListItem.tsx @@ -29,12 +29,7 @@ export type NavListItemPropsType = { icon?: React.ReactElement | null; }; -NavListItem.defaultProps = { - sublinks: [], - icon: null, -}; - -function NavListItem({ sublinks, href, name, icon }: NavListItemPropsType) { +function NavListItem({ sublinks, href, name, icon = null }: NavListItemPropsType) { const [areSublinksVisible, setSublinksVisible] = useState(false); const handleKeyDown = (event: React.KeyboardEvent, indexKeyedOn: number) => {