import type { FC } from 'react'; import { FormattedMessage } from 'react-intl'; import type { NavLinkProps } from 'react-router-dom'; import { NavLink } from 'react-router-dom'; import { useAccount } from '@/mastodon/hooks/useAccount'; import { useAccountId } from '@/mastodon/hooks/useAccountId'; import classes from './redesign.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 null; } const { acct, show_featured, show_media } = account; return (
{show_media && ( )} {show_featured && ( )}
); };