fix searching

This commit is contained in:
polv committed 2020-12-18 09:37:43 +07:00
1 parent 25585aa3da
commit 43edfb60d4
10 files changed
+126 -102

No files matched your search

@@ -0,0 +1,32 @@
import { THEME } from '~/assets/global'
import styles from '~/styles/TitleDescription.module.css'
const TitleDescription = ({ date }: { date?: number }) => {
return (
<small className={styles.Small}>
<span>
by&nbsp;
{THEME.author.url ? (
<a href={THEME.author.url} target="_blank" rel="noopener noreferrer">
{THEME.author.name}
</a>
) : (
<span>{THEME.author.name}</span>
)}
</span>
{date ? (
<span className={styles.date}>
{new Date(date).toLocaleDateString([], {
year: 'numeric',
month: 'long',
day: 'numeric',
weekday: 'short'
})}
</span>
) : null}
</small>
)
}
export default TitleDescription