import { faChartPie as pieChartIcon, faEdit as editIcon } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { FC } from 'react'; import { Link } from 'react-router-dom'; import { DropdownItem } from 'reactstrap'; import { useToggle } from '../../../src/utils/helpers/hooks'; import { RowDropdownBtn } from '../../../src/utils/RowDropdownBtn'; import { useFeature } from '../../utils/features'; import { useRoutesPrefix } from '../../utils/routesPrefix'; import { DEFAULT_DOMAIN } from '../../visits/reducers/domainVisits'; import type { Domain } from '../data'; import type { EditDomainRedirects } from '../reducers/domainRedirects'; import { EditDomainRedirectsModal } from './EditDomainRedirectsModal'; interface DomainDropdownProps { domain: Domain; editDomainRedirects: (redirects: EditDomainRedirects) => Promise; } export const DomainDropdown: FC = ({ domain, editDomainRedirects }) => { const [isModalOpen, toggleModal] = useToggle(); const withVisits = useFeature('domainVisits'); const routesPrefix = useRoutesPrefix(); return ( {withVisits && ( Visit stats )} Edit redirects ); };