diff --git a/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx b/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx index d0be1aef6..f76d5f9b9 100644 --- a/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx +++ b/app/scripts/components/common/page-header/nav/nav-dropdown-button.tsx @@ -3,27 +3,25 @@ import { USWDSNavDropDownButton } from '../../uswds/header/nav-drop-down-button' import { USWDSMenu } from '../../uswds/header/menu'; import { DropdownNavLink } from '../types'; import { createDynamicNavMenuList } from './create-dynamic-nav-menu-list'; +import { SetState } from '$types/aliases'; import { LinkProperties } from '$types/veda'; interface NavDropDownButtonProps { item: DropdownNavLink; isOpen: boolean[]; - setIsOpen: React.Dispatch>; + setIsOpen: SetState; index: number; linkProperties: LinkProperties; } -export const NavDropDownButton: React.FC = ({ +export const NavDropDownButton = ({ item, isOpen, setIsOpen, index, linkProperties -}) => { - const onToggle = ( - index: number, - setIsOpen: React.Dispatch> - ): void => { +}: NavDropDownButtonProps) => { + const onToggle = (index: number, setIsOpen: SetState): void => { setIsOpen((prevIsOpen) => { const newIsOpen = prevIsOpen.map( (prev, i) =>