diff --git a/app/scripts/components/common/google-form.tsx b/app/scripts/components/common/google-form.tsx index 3e4e15633..91a34dbc9 100644 --- a/app/scripts/components/common/google-form.tsx +++ b/app/scripts/components/common/google-form.tsx @@ -42,7 +42,7 @@ const ButtonAsNavLink = styled(Button)` `} `; -function GoogleForm(props: { title: string, src: string}) { +function GoogleForm(props): React.FC<{ title: string, src: string }>{ const { title, src } = props; const { isRevealed, show, hide } = useFeedbackModal(); diff --git a/app/scripts/components/common/page-header/index.tsx b/app/scripts/components/common/page-header/index.tsx index be8bd49b0..5564d8a1a 100644 --- a/app/scripts/components/common/page-header/index.tsx +++ b/app/scripts/components/common/page-header/index.tsx @@ -226,7 +226,6 @@ const GlobalMenu = styled.ul` `} `; - export const MODAL_TYPE = 'modal'; export const INTERNAL_LINK_TYPE = 'internalLink'; export const EXTERNAL_LINK_TYPE = 'externalLink'; diff --git a/app/scripts/components/common/page-header/nav-menu-item.tsx b/app/scripts/components/common/page-header/nav-menu-item.tsx index a70e3008f..b2858fae3 100644 --- a/app/scripts/components/common/page-header/nav-menu-item.tsx +++ b/app/scripts/components/common/page-header/nav-menu-item.tsx @@ -8,12 +8,14 @@ import { themeVal } from '@devseed-ui/theme-provider'; import { Button } from '@devseed-ui/button'; +import { CollecticonChevronDownSmall } from '@devseed-ui/collecticons'; import { DropMenu, DropMenuItem } from '@devseed-ui/dropdown'; import DropdownScrollable from '../dropdown-scrollable'; import GoogleForm from '../google-form'; import { AlignmentEnum, InternalNavLink, ExternalNavLink, NavLinkItem, DropdownNavLink, ModalNavLink, NavItem } from './types'; +import { MODAL_TYPE, INTERNAL_LINK_TYPE, EXTERNAL_LINK_TYPE, DROPDOWN_TYPE } from './'; import GlobalMenuLinkCSS from '$styles/menu-link'; import { useMediaQuery } from '$utils/use-media-query'; @@ -58,13 +60,8 @@ const DropMenuNavItem = styled(DropMenuItem)` `} `; -export const MODAL_TYPE = 'modal'; -export const INTERNAL_LINK_TYPE = 'internalLink'; -export const EXTERNAL_LINK_TYPE = 'externalLink'; -export const DROPDOWN_TYPE = 'dropdown'; - -function ChildItem({ child, onClick }: { child: NavLinkItem, onClick?:() => void}) { +function LinkDropMenuNavItem({ child, onClick }: { child: NavLinkItem, onClick?:() => void}) { const { title, type, ...rest } = child; if (type === INTERNAL_LINK_TYPE) { return ( @@ -117,7 +114,8 @@ export default function NavMenuItem({ item, alignment, onClick }: {item: NavItem ); } else if (type === MODAL_TYPE) { return (