mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-24 21:26:02 +00:00
Add example
This commit is contained in:
6
example/components/Date.js
Normal file
6
example/components/Date.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { parseISO, format } from 'date-fns'
|
||||
|
||||
export default function Date({ dateString }) {
|
||||
const date = parseISO(dateString)
|
||||
return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
|
||||
}
|
||||
Reference in New Issue
Block a user