import React from 'react'; import { useTranslation } from 'next-i18next'; import { useCurrentPagePath } from '~/stores/page'; import type { GetItemProps } from '../interfaces/downshift'; import { SearchMenuItem } from './SearchMenuItem'; import styles from './SearchMethodMenuItem.module.scss'; type Props = { activeIndex: number | null searchKeyword: string getItemProps: GetItemProps } export const SearchMethodMenuItem = (props: Props): JSX.Element => { const { activeIndex, searchKeyword, getItemProps, } = props; const { t } = useTranslation('commons'); const { data: currentPagePath } = useCurrentPagePath(); const shouldShowMenuItem = searchKeyword.trim().length > 0; return (
prefix: {currentPagePath}
{searchKeyword}