2025-03-23 20:19:42 +00:00
|
|
|
import moreIcon from '@tabler/icons/outline/dots-circle-horizontal.svg';
|
|
|
|
import { defineMessages, useIntl } from 'react-intl';
|
|
|
|
|
|
|
|
import Button from 'soapbox/components/ui/button.tsx';
|
|
|
|
import { Column } from 'soapbox/components/ui/column.tsx';
|
|
|
|
import Transactions from 'soapbox/features/wallet/components/transactions.tsx';
|
2025-03-25 16:31:14 +00:00
|
|
|
import { useTransactions } from 'soapbox/features/zap/hooks/useHooks.ts';
|
2025-03-23 20:19:42 +00:00
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: { id: 'wallet.transactions', defaultMessage: 'Transactions' },
|
|
|
|
more: { id: 'wallet.transactions.show_more', defaultMessage: 'Show More' },
|
2025-03-25 16:31:14 +00:00
|
|
|
loading: { id: 'wallet.loading', defaultMessage: 'Loading…' },
|
2025-03-23 20:19:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
const WalletTransactions = () => {
|
|
|
|
const intl = useIntl();
|
2025-03-25 16:31:14 +00:00
|
|
|
const { isLoading, expandTransactions } = useTransactions();
|
2025-03-23 20:19:42 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Column label={intl.formatMessage(messages.title)} >
|
2025-03-25 16:31:14 +00:00
|
|
|
<Transactions />
|
2025-03-23 20:19:42 +00:00
|
|
|
<div className='flex w-full justify-center'>
|
2025-03-25 16:31:14 +00:00
|
|
|
<Button icon={isLoading ? undefined : moreIcon} theme='primary' onClick={expandTransactions}>
|
|
|
|
{isLoading ? intl.formatMessage(messages.loading) : intl.formatMessage(messages.more)}
|
2025-03-23 20:19:42 +00:00
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</Column>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default WalletTransactions;
|