Skip to content

Commit 8640d7d

Browse files
refracto: using intl api
1 parent 5acc84d commit 8640d7d

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

frontend/deno.lock

-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/routes/account/tokens/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function PersonalTokenRow({ token }: { token: Token }) {
105105
<b>Active</b> {expiresAt === null
106106
? "forever"
107107
: `– expires ${
108-
timeAgo(expiresAt).replace(
108+
timeAgo(new Date().getTime(), expiresAt.getTime()).replace(
109109
"ago",
110110
"from now",
111111
)
@@ -160,7 +160,7 @@ function SessionRow({ token }: { token: Token }) {
160160
<b>Active</b> {expiresAt === null
161161
? "forever"
162162
: `– expires ${
163-
timeAgo(expiresAt).replace(
163+
timeAgo(expiresAt.getTime()).replace(
164164
"ago",
165165
"from now",
166166
)

frontend/routes/admin/publishingTasks.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default define.page<typeof handler>(function PublishingTasks({
104104
10,
105105
)}
106106
>
107-
{timeAgo(new Date(publishingTask.createdAt))}
107+
{timeAgo(publishingTask.createdAt)}
108108
</TableData>
109109
<TableData
110110
title={new Date(publishingTask.updatedAt).toISOString().slice(
@@ -113,7 +113,7 @@ export default define.page<typeof handler>(function PublishingTasks({
113113
)}
114114
align="right"
115115
>
116-
{timeAgo(new Date(publishingTask.updatedAt))}
116+
{timeAgo(publishingTask.updatedAt)}
117117
</TableData>
118118
<TableData
119119
title={new Date(publishingTask.createdAt).toISOString().slice(

frontend/routes/package/versions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ function Version({
284284
: <TbClockHour3 class="size-4 stroke-blue-500 stroke-2" />}
285285
<span>
286286
{ordinalNumber(tasks.length - i)} publishing attempt{" "}
287-
{statusVerb[task.status]} {timeAgo(new Date(task.updatedAt))}
287+
{statusVerb[task.status]} {timeAgo(task.updatedAt)}
288288
</span>
289289
<a href={`/status/${task.id}`} class="link justify-self-end z-20">
290290
Details

0 commit comments

Comments
 (0)