diff --git a/app/soapbox/features/birthdays/account.tsx b/app/soapbox/features/birthdays/account.tsx index e72499b3d7..94b7e08a6e 100644 --- a/app/soapbox/features/birthdays/account.tsx +++ b/app/soapbox/features/birthdays/account.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { useEffect } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import Avatar from 'soapbox/components/avatar'; @@ -17,18 +16,17 @@ const getAccount = makeGetAccount(); interface IAccount { accountId: string, - fetchAccount: (id: string) => void, } -const Account: React.FC = ({ accountId, fetchAccount }) => { +const Account: React.FC = ({ accountId }) => { const intl = useIntl(); const account = useAppSelector((state) => getAccount(state, accountId)); - useEffect(() => { - if (accountId && !account) { - fetchAccount(accountId); - } - }, [accountId]); + // useEffect(() => { + // if (accountId && !account) { + // fetchAccount(accountId); + // } + // }, [accountId]); if (!account) return null; @@ -48,7 +46,7 @@ const Account: React.FC = ({ accountId, fetchAccount }) => {
void, +} + +const BirthdaysModal = ({ onClose }: IBirthdaysModal) => { + const accountIds = useAppSelector(state => state.user_lists.getIn(['birthday_reminders', state.me])); + + const onClickClose = () => { + onClose('BIRTHDAYS'); + }; + + let body; + + if (!accountIds) { + body = ; + } else { + const emptyMessage = ; + + body = ( + + {accountIds.map(id => + , + )} + + ); + } + + + return ( + } + onClose={onClickClose} + > + {body} + + ); +}; + +export default BirthdaysModal;