mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 22:48:14 +00:00
change reading time to content meta
This commit is contained in:
parent
ee9ed4f287
commit
e21f0f9bb9
5 changed files with 40 additions and 31 deletions
quartz/components
|
@ -2,11 +2,14 @@ interface Props {
|
|||
date: Date
|
||||
}
|
||||
|
||||
export function Date({ date }: Props) {
|
||||
const formattedDate = date.toLocaleDateString("en-US", {
|
||||
export function formatDate(d: Date): string {
|
||||
return d.toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "2-digit",
|
||||
})
|
||||
return <>{formattedDate}</>
|
||||
}
|
||||
|
||||
export function Date({ date }: Props) {
|
||||
return <>{formatDate(date)}</>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue