From 39d9476992420bac12751b48d592c79caa9ac8d1 Mon Sep 17 00:00:00 2001 From: Vania Kucher Date: Wed, 22 Apr 2020 12:43:07 +0300 Subject: [PATCH] Avoid bugs with native Date class (#12098) --- .../blog-starter/components/{date.js => date-formater.js} | 2 +- examples/blog-starter/components/hero-post.js | 4 ++-- examples/blog-starter/components/post-header.js | 4 ++-- examples/blog-starter/components/post-preview.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename examples/blog-starter/components/{date.js => date-formater.js} (74%) diff --git a/examples/blog-starter/components/date.js b/examples/blog-starter/components/date-formater.js similarity index 74% rename from examples/blog-starter/components/date.js rename to examples/blog-starter/components/date-formater.js index eac5681378bfd..b346c94cab03f 100644 --- a/examples/blog-starter/components/date.js +++ b/examples/blog-starter/components/date-formater.js @@ -1,6 +1,6 @@ import { parseISO, format } from 'date-fns' -export default function Date({ dateString }) { +export default function DateFormater({ dateString }) { const date = parseISO(dateString) return } diff --git a/examples/blog-starter/components/hero-post.js b/examples/blog-starter/components/hero-post.js index 1ef6a35763cf5..68f7cb984ad03 100644 --- a/examples/blog-starter/components/hero-post.js +++ b/examples/blog-starter/components/hero-post.js @@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from '../components/cover-image' import Link from 'next/link' @@ -24,7 +24,7 @@ export default function HeroPost({
- +
diff --git a/examples/blog-starter/components/post-header.js b/examples/blog-starter/components/post-header.js index fe9cd62aa7e3c..4a832420cbd27 100644 --- a/examples/blog-starter/components/post-header.js +++ b/examples/blog-starter/components/post-header.js @@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from '../components/cover-image' import PostTitle from '../components/post-title' @@ -18,7 +18,7 @@ export default function PostHeader({ title, coverImage, date, author }) {
- +
diff --git a/examples/blog-starter/components/post-preview.js b/examples/blog-starter/components/post-preview.js index bf1aa0746721c..ac8c8b98a5628 100644 --- a/examples/blog-starter/components/post-preview.js +++ b/examples/blog-starter/components/post-preview.js @@ -1,5 +1,5 @@ import Avatar from '../components/avatar' -import Date from '../components/date' +import DateFormater from '../components/date-formater' import CoverImage from './cover-image' import Link from 'next/link' @@ -22,7 +22,7 @@ export default function PostPreview({
- +

{excerpt}