import type { FC } from 'react'; import { FormattedMessage } from 'react-intl'; import type { NavLinkProps } from 'react-router-dom'; import { useAccount } from '@/mastodon/hooks/useAccount'; import { useAccountId } from '@/mastodon/hooks/useAccountId'; import { TabLink, TabList } from '../tab_list'; import classes from './styles.module.scss'; const isActive: Required['isActive'] = (match, location) => match?.url === location.pathname || (!!match?.url && location.pathname.startsWith(`${match.url}/tagged/`)); export const AccountTabs: FC = () => { const accountId = useAccountId(); const account = useAccount(accountId); if (!account) { return
; } const { acct, show_featured, show_media } = account; if (!show_featured && !show_media) { return
; } return ( {show_media && ( )} {show_featured && ( )} ); };