From c18580434105c69213b24329b281610c7b86092a Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 8 Nov 2019 10:25:01 +0400 Subject: [PATCH] Rename featured guide and featured block components --- components/featured-content/guides.js | 4 ++-- components/featured-content/roadmaps.js | 4 ++-- components/{guide-block => featured-guide}/index.js | 4 ++-- components/{guide-block => featured-guide}/style.js | 0 components/{roadmap-block => featured-roadmap}/index.js | 4 ++-- components/{roadmap-block => featured-roadmap}/style.js | 0 pages/roadmaps.js | 8 -------- 7 files changed, 8 insertions(+), 16 deletions(-) rename components/{guide-block => featured-guide}/index.js (93%) rename components/{guide-block => featured-guide}/style.js (100%) rename components/{roadmap-block => featured-roadmap}/index.js (85%) rename components/{roadmap-block => featured-roadmap}/style.js (100%) diff --git a/components/featured-content/guides.js b/components/featured-content/guides.js index bb29eb633..df47d3cf3 100644 --- a/components/featured-content/guides.js +++ b/components/featured-content/guides.js @@ -1,7 +1,7 @@ import Link from 'next/link'; import { FeaturedContentWrap } from './style'; import guides from 'data/guides'; -import GuideBlock from 'components/guide-block'; +import FeaturedGuide from 'components/featured-guide'; const FeaturedGuides = () => ( @@ -16,7 +16,7 @@ const FeaturedGuides = () => ( { guides .filter(({ featured }) => featured) .map(guide => ( - + )) } diff --git a/components/featured-content/roadmaps.js b/components/featured-content/roadmaps.js index 33e40828f..122775b63 100644 --- a/components/featured-content/roadmaps.js +++ b/components/featured-content/roadmaps.js @@ -1,7 +1,7 @@ import Link from 'next/link'; import { FeaturedContentWrap } from './style'; import roadmaps from 'data/roadmaps'; -import RoadmapBlock from 'components/roadmap-block'; +import FeaturedRoadmap from 'components/featured-roadmap'; const FeaturedRoadmaps = () => ( @@ -21,7 +21,7 @@ const FeaturedRoadmaps = () => ( { roadmaps .filter(({ featured }) => featured) .map(roadmap => ( - + )) } diff --git a/components/guide-block/index.js b/components/featured-guide/index.js similarity index 93% rename from components/guide-block/index.js rename to components/featured-guide/index.js index d51b8d61a..7884e5b78 100644 --- a/components/guide-block/index.js +++ b/components/featured-guide/index.js @@ -4,7 +4,7 @@ import formatDate from 'date-fns/format' import { Author, AuthorImage, AuthorName, BlockLink, BlockMeta, BlockSubtitle, BlockTitle, PublishDate } from './style'; import { findByUsername } from 'lib/author'; -const GuideBlock = ({ guide }) => { +const FeaturedGuide = ({ guide }) => { const author = findByUsername(guide.author) || {}; return (
@@ -25,4 +25,4 @@ const GuideBlock = ({ guide }) => { ) }; -export default GuideBlock; +export default FeaturedGuide; diff --git a/components/guide-block/style.js b/components/featured-guide/style.js similarity index 100% rename from components/guide-block/style.js rename to components/featured-guide/style.js diff --git a/components/roadmap-block/index.js b/components/featured-roadmap/index.js similarity index 85% rename from components/roadmap-block/index.js rename to components/featured-roadmap/index.js index 7a376df2d..94aa574a8 100644 --- a/components/roadmap-block/index.js +++ b/components/featured-roadmap/index.js @@ -1,7 +1,7 @@ import Link from 'next/link'; import { BlockLink, BlockSubtitle, BlockTitle } from './style'; -const RoadmapBlock = ({ roadmap }) => ( +const FeaturedRoadmap = ({ roadmap }) => (
@@ -12,4 +12,4 @@ const RoadmapBlock = ({ roadmap }) => (
); -export default RoadmapBlock; +export default FeaturedRoadmap; diff --git a/components/roadmap-block/style.js b/components/featured-roadmap/style.js similarity index 100% rename from components/roadmap-block/style.js rename to components/featured-roadmap/style.js diff --git a/pages/roadmaps.js b/pages/roadmaps.js index 64ae6823a..c7ff024a6 100644 --- a/pages/roadmaps.js +++ b/pages/roadmaps.js @@ -1,18 +1,10 @@ -import roadmaps from 'data/roadmaps'; import DefaultLayout from 'layouts/default/index'; import SiteNav from 'components/site-nav'; -import RoadmapBlock from 'components/roadmap-block'; const RoadmapsList = () => (
-
- { roadmaps - .map(roadmap => ( - - )) } -
);