Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
refactor: Render current days in headers/footers
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Feb 10, 2023
1 parent 06feb02 commit 2befee5
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,7 @@ const EntryCard: React.FC<IEntryCardProps> = ({
}
{...otherProps}
>
<CardTitle>
{entry.title}
{showDay && (
<>
{" "}
· <span className="pf-u-color-300">Day {entry.day}</span>
</>
)}
</CardTitle>
<CardTitle>{entry.title}</CardTitle>
<CardBody>{entry.text}</CardBody>
<CardFooter>
<Flex
Expand All @@ -212,15 +204,25 @@ const EntryCard: React.FC<IEntryCardProps> = ({
default: "alignItemsCenter",
}}
>
{showDate && (
<FlexItem>
{entry.date.toLocaleTimeString("default", {
weekday: "long",
hour: "2-digit",
minute: "2-digit",
})}
</FlexItem>
)}
<FlexItem>
{showDate
? entry.date.toLocaleTimeString("default", {
weekday: "long",
hour: "2-digit",
minute: "2-digit",
})
: entry.date.toLocaleTimeString("default", {
hour: "2-digit",
minute: "2-digit",
})}

{showDay && (
<>
{" "}
· <span>Day {entry.day}</span>
</>
)}
</FlexItem>

<FlexItem>
<TopicsChips topics={entry.topics} />
Expand Down

1 comment on commit 2befee5

@vercel
Copy link

@vercel vercel bot commented on 2befee5 Feb 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

diary – ./

diary-mu.vercel.app
diary-morniteaque.vercel.app
diary-git-main-morniteaque.vercel.app

Please sign in to comment.