Skip to content

Commit

Permalink
wip: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
OzakIOne committed Feb 23, 2024
1 parent 8d7bb9c commit 220a50f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ describe('blog plugin', () => {
name: 'Yangshun Tay (translated)',
},
{
imageURL: undefined,
email: 'lorber.sebastien@gmail.com',
key: 'slorber',
name: 'Sébastien Lorber (translated)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function LastUpdatedAtDate({
}: {
lastUpdatedAt: number;
}): JSX.Element {
const convertedLastUpdateAt = lastUpdatedAt * 1000;
const atDate = new Date(lastUpdatedAt * 1000);

const dateTimeFormat = useDateTimeFormat({
day: 'numeric',
Expand All @@ -25,11 +25,7 @@ function LastUpdatedAtDate({
timeZone: 'UTC',
});

const formatLastUpdatedAt = (lastUpdated: number) =>
dateTimeFormat.format(new Date(lastUpdated));

const formattedLastUpdatedAt =
lastUpdatedAt && formatLastUpdatedAt(convertedLastUpdateAt);
const formattedLastUpdatedAt = dateTimeFormat.format(atDate);

return (
<Translate
Expand All @@ -38,7 +34,7 @@ function LastUpdatedAtDate({
values={{
date: (
<b>
<time dateTime={new Date(convertedLastUpdateAt).toISOString()}>
<time dateTime={atDate.toISOString()}>
{formattedLastUpdatedAt}
</time>
</b>
Expand Down

0 comments on commit 220a50f

Please sign in to comment.