diff --git a/app/soapbox/features/crypto_donate/components/crypto_donate_panel.js b/app/soapbox/features/crypto_donate/components/crypto_donate_panel.js deleted file mode 100644 index 23b401c7f8..0000000000 Binary files a/app/soapbox/features/crypto_donate/components/crypto_donate_panel.js and /dev/null differ diff --git a/app/soapbox/features/crypto_donate/components/crypto_donate_panel.tsx b/app/soapbox/features/crypto_donate/components/crypto_donate_panel.tsx new file mode 100644 index 0000000000..9ec9e97e0f --- /dev/null +++ b/app/soapbox/features/crypto_donate/components/crypto_donate_panel.tsx @@ -0,0 +1,55 @@ +import classNames from 'classnames'; +import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import { Link } from 'react-router-dom'; + +import Icon from 'soapbox/components/icon'; +import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks'; + +import SiteWallet from './site_wallet'; + +interface ICryptoDonatePanel { + limit: number, +} + +const CryptoDonatePanel: React.FC = ({ limit = 3 }): JSX.Element | null => { + const addresses = useSoapboxConfig().get('cryptoAddresses'); + const siteTitle = useAppSelector((state) => state.instance.title); + + if (limit === 0 || addresses.size === 0) { + return null; + } + + const more = addresses.size - limit; + const hasMore = more > 0; + + return ( +
+
+ + + + +
+
+
+ +
+ +
+ {hasMore && + + } +
+ ); +}; + +export default CryptoDonatePanel; diff --git a/app/soapbox/pages/home_page.js b/app/soapbox/pages/home_page.js index 65d581d283..e8a12a5d8c 100644 Binary files a/app/soapbox/pages/home_page.js and b/app/soapbox/pages/home_page.js differ