Skip to content

Commit

Permalink
Update API Key Last Accessed to omit time
Browse files Browse the repository at this point in the history
Since accessedAt is only updated once in the last 24 hours,
showing the time can cause confusion.
  • Loading branch information
stnguyen90 committed Jul 26, 2023
1 parent c57a8d2 commit 28b4b99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
TableHeader,
TableRowLink
} from '$lib/elements/table';
import { toLocaleDateTime } from '$lib/helpers/date';
import { toLocaleDate, toLocaleDateTime } from '$lib/helpers/date';
import { wizard } from '$lib/stores/wizard';
import type { PageData } from './$types';
import Wizard from './wizard.svelte';
Expand Down Expand Up @@ -46,7 +46,7 @@
{key.name}
</TableCellText>
<TableCellText onlyDesktop title="Last Accessed">
{key.accessedAt ? toLocaleDateTime(key.accessedAt) : 'never'}
{key.accessedAt ? toLocaleDate(key.accessedAt) : 'never'}
</TableCellText>
<TableCellText onlyDesktop title="Expiration Date">
{key.expire ? toLocaleDateTime(key.expire) : 'never'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Dependencies } from '$lib/constants';
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
import { symmetricDifference } from '$lib/helpers/array';
import { toLocaleDateTime } from '$lib/helpers/date';
import { toLocaleDate } from '$lib/helpers/date';
import { Container } from '$lib/layout';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
Expand Down Expand Up @@ -83,7 +83,7 @@
</svelte:head>

<Container>
{@const accessedAt = $key.accessedAt ? toLocaleDateTime($key.accessedAt) : 'never'}
{@const accessedAt = $key.accessedAt ? toLocaleDate($key.accessedAt) : 'never'}
<CardGrid>
<div>
<Heading tag="h6" size="7">{$key.name}</Heading>
Expand Down

0 comments on commit 28b4b99

Please sign in to comment.