glitch-soc/mastodon

View on GitHub
app/javascript/mastodon/features/ui/components/annual_report_modal.tsx

Summary

Maintainability
B
4 hrs
Test Coverage
import { useEffect } from 'react';

import { AnnualReport } from 'mastodon/features/annual_report';

const AnnualReportModal: React.FC<{
  year: string;
  onChangeBackgroundColor: (arg0: string) => void;
}> = ({ year, onChangeBackgroundColor }) => {
  useEffect(() => {
    onChangeBackgroundColor('var(--indigo-1)');
  }, [onChangeBackgroundColor]);

  return (
    <div className='modal-root__modal annual-report-modal'>
      <AnnualReport year={year} />
    </div>
  );
};

// eslint-disable-next-line import/no-default-export
export default AnnualReportModal;