kopia lustrzana https://github.com/Stopka/fedisearch
15 wiersze
462 B
TypeScript
15 wiersze
462 B
TypeScript
import React from 'react'
|
|
import { faCalendarPlus } from '@fortawesome/free-solid-svg-icons'
|
|
import Badge from './Badge'
|
|
|
|
const CreatedAtBadge:React.FC<{ createdAt: string | null }> = ({ createdAt }) => {
|
|
return (
|
|
<Badge faIcon={faCalendarPlus}
|
|
label={'Created at'}
|
|
value={createdAt !== null ? (new Date(createdAt)).toLocaleDateString() : null}
|
|
className={'created-at'}
|
|
/>
|
|
)
|
|
}
|
|
export default CreatedAtBadge
|