Skip to content

Commit

Permalink
fixup! Adding tests to transactions pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bizz committed Oct 16, 2024
1 parent 30b7a6e commit 40093b0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,10 @@ const formatAmountForExport = (
};

const formatDateRange = (startDate?: DateTime, endDate?: DateTime) => {
if (!startDate) {
startDate = DateTime.local().minus({ months: 1 }).plus({ days: 1 });
}
if (!endDate) {
endDate = DateTime.local();
}
return `${startDate.toISODate()}..${endDate.toISODate()}`;
const minDate =
startDate ?? DateTime.local().minus({ months: 1 }).plus({ days: 1 });
const maxDate = endDate ?? DateTime.local();
return `${minDate.toISODate()}..${maxDate.toISODate()}`;
};

export const AccountTransactions: React.FC = () => {
Expand Down

0 comments on commit 40093b0

Please sign in to comment.