Skip to content

Commit

Permalink
feat: update date formatting to not show the day of week
Browse files Browse the repository at this point in the history
  • Loading branch information
rozanagy committed Oct 22, 2024
1 parent d355b63 commit c878452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ export function findEthereumNetworkByName(ethereumNetworkName: string): Chain {

export function formatEvent(event: DetailedEvent): FormattedEvent {
const isMint = event.eventType === 'mint';
const date = new Date(event.timestamp * 1000);
return {
dlcBTCAmount: isMint ? event.value : -event.value,
merchant: isMint ? event.to : event.from,
txHash: event.txHash,
date: new Date(event.timestamp * 1000).toDateString(),
date: date.toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }).replace(',', ''),
isMint,
chain: event.chain,
isCCIP: event.isCCIP,
Expand Down

0 comments on commit c878452

Please sign in to comment.