diff options
author | Florian Dold <florian@dold.me> | 2023-05-26 13:52:00 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-05-26 13:52:00 +0200 |
commit | 96d9ea3840626f71efe38018b75748d8338565fa (patch) | |
tree | d1f04ecbb58750af79b3d0cb0420ba4fdf6d05a2 /packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx | |
parent | cd8f76db61f4a1ab1a8a8a4d29b2f3e863b59854 (diff) | |
download | wallet-core-96d9ea3840626f71efe38018b75748d8338565fa.tar.xz |
taler-util,wallet-core: make AbsoluteTime opaque
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx b/packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx index 0f8fa7f26..03a08016a 100644 --- a/packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Notifications/views.tsx @@ -52,7 +52,8 @@ export function ReadyView({ list }: State.Ready): VNode { } const byDate = list.reduce((rv, x) => { - const theDate = x.when.t_ms === "never" ? 0 : normalizeToDay(x.when.t_ms); + const theDate = + x.when.t_s === "never" ? 0 : normalizeToDay(x.when.t_s * 1000); if (theDate) { (rv[theDate] = rv[theDate] || []).push(x); } @@ -68,7 +69,9 @@ export function ReadyView({ list }: State.Ready): VNode { <Fragment key={i}> <DateSeparator> <Time - timestamp={{ t_ms: Number.parseInt(d, 10) }} + timestamp={AbsoluteTime.fromMilliseconds( + Number.parseInt(d, 10), + )} format="dd MMMM yyyy" /> </DateSeparator> @@ -77,7 +80,7 @@ export function ReadyView({ list }: State.Ready): VNode { key={i} info={n.info} isRead={n.read} - timestamp={n.when} + timestamp={AbsoluteTime.fromPreciseTimestamp(n.when)} /> ))} </Fragment> |