transfer-out: transfer out
This commit is contained in:
parent
ec84f64e63
commit
29ed921c67
1056 changed files with 154507 additions and 0 deletions
27
apps/docs/components/ArticleDetails.tsx
Normal file
27
apps/docs/components/ArticleDetails.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import { Article } from '@/types/content-types'
|
||||
import { Icon } from './Icon'
|
||||
|
||||
type ArticleDetailsProps = {
|
||||
article: Article
|
||||
}
|
||||
|
||||
export function ArticleDetails({ article: { sourceUrl, date } }: ArticleDetailsProps) {
|
||||
return (
|
||||
<div className="article__details">
|
||||
<a className="article__details__edit" href={sourceUrl}>
|
||||
<Icon icon="edit" />
|
||||
<span>Edit this page</span>
|
||||
</a>
|
||||
{date && (
|
||||
<div className="article__details__timestamp">
|
||||
Last edited on{' '}
|
||||
{Intl.DateTimeFormat('en-gb', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
}).format(new Date(date))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue