import React from 'react'; import { useTranslation } from 'react-i18next'; import { DropdownMenu, DropdownItem } from 'reactstrap'; import { LabelType } from '~/interfaces/template'; type DropendMenuProps = { onClickCreateNewPageButtonHandler: () => Promise onClickCreateTodaysButtonHandler: () => Promise onClickTemplateButtonHandler: (label: LabelType) => Promise todaysPath: string | null, } export const DropendMenu = React.memo((props: DropendMenuProps): JSX.Element => { const { onClickCreateNewPageButtonHandler, onClickCreateTodaysButtonHandler, onClickTemplateButtonHandler, todaysPath, } = props; const { t } = useTranslation('commons'); return ( <> {/*
  • {todaysPath != null && ( <>

  • {t('create_page_dropdown.todays.desc')}
  • )}

  • {t('create_page_dropdown.template.desc')}
*/} {t('create_page_dropdown.new_page')} {todaysPath != null && ( <>
  • {t('create_page_dropdown.todays.desc')}
  • {todaysPath} )}
  • {t('create_page_dropdown.template.desc')}
  • onClickTemplateButtonHandler('_template')} > {t('create_page_dropdown.template.children')} onClickTemplateButtonHandler('__template')} > {t('create_page_dropdown.template.descendants')}
    ); }); DropendMenu.displayName = 'DropendMenu';