reverse so newest transactions come first

This commit is contained in:
Anthony 2021-07-27 19:15:15 +02:00
parent 770baef5d6
commit 057d2c5f02
No known key found for this signature in database
GPG key ID: C386D3C93D50E356

View file

@ -130,7 +130,7 @@ class StripeAccountConnection extends React.Component<Props, State> {
).then((accountListResponse: any) => {
// TODO type this
that.setState({
accountTransactions: accountListResponse,
accountTransactions: accountListResponse.reverse(),
});
console.log(accountListResponse);
@ -303,7 +303,7 @@ class StripeAccountConnection extends React.Component<Props, State> {
</thead>
<tbody>
{accountTransactions &&
accountTransactions.reverse().map((transaction) => (
accountTransactions.map((transaction) => (
<tr key={transaction.name + transaction.created_at}>
<td>{moment(transaction.created_at).format('LLL')}</td>
<td>