import { FormattedMessage } from 'react-intl'; import type { ApiAnnualReportState } from '@/mastodon/api/annual_report'; import { Button } from '@/mastodon/components/button'; import styles from './styles.module.scss'; export interface AnnualReportAnnouncementProps { year: string; state: Exclude; onRequestBuild: () => void; onOpen?: () => void; // This is optional when inside the modal, as it won't be shown then. onDismiss: () => void; } export const AnnualReportAnnouncement: React.FC< AnnualReportAnnouncementProps > = ({ year, state, onRequestBuild, onOpen, onDismiss }) => { return (
{state === 'available' ? ( ) : ( )} {state === 'eligible' && ( )}
); };