mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-01-17 22:28:32 +01:00
Rename featured guide and featured block components
This commit is contained in:
parent
eee62c0f69
commit
c185804341
@ -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 = () => (
|
||||
<FeaturedContentWrap className="featured-content-wrap">
|
||||
@ -16,7 +16,7 @@ const FeaturedGuides = () => (
|
||||
{ guides
|
||||
.filter(({ featured }) => featured)
|
||||
.map(guide => (
|
||||
<GuideBlock guide={ guide } key={ guide.url } />
|
||||
<FeaturedGuide guide={ guide } key={ guide.url } />
|
||||
)) }
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 = () => (
|
||||
<FeaturedContentWrap className="featured-content-wrap">
|
||||
@ -21,7 +21,7 @@ const FeaturedRoadmaps = () => (
|
||||
{ roadmaps
|
||||
.filter(({ featured }) => featured)
|
||||
.map(roadmap => (
|
||||
<RoadmapBlock roadmap={ roadmap } key={ roadmap.url } />
|
||||
<FeaturedRoadmap roadmap={ roadmap } key={ roadmap.url } />
|
||||
)) }
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 (
|
||||
<div className="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12 grid-item-container">
|
||||
@ -25,4 +25,4 @@ const GuideBlock = ({ guide }) => {
|
||||
)
|
||||
};
|
||||
|
||||
export default GuideBlock;
|
||||
export default FeaturedGuide;
|
@ -1,7 +1,7 @@
|
||||
import Link from 'next/link';
|
||||
import { BlockLink, BlockSubtitle, BlockTitle } from './style';
|
||||
|
||||
const RoadmapBlock = ({ roadmap }) => (
|
||||
const FeaturedRoadmap = ({ roadmap }) => (
|
||||
<div className="col-xl-4 col-lg-4 col-md-6 col-sm-12 col-12 grid-item-container">
|
||||
<Link href={ roadmap.url } passHref>
|
||||
<BlockLink>
|
||||
@ -12,4 +12,4 @@ const RoadmapBlock = ({ roadmap }) => (
|
||||
</div>
|
||||
);
|
||||
|
||||
export default RoadmapBlock;
|
||||
export default FeaturedRoadmap;
|
@ -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 = () => (
|
||||
<DefaultLayout>
|
||||
<SiteNav />
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{ roadmaps
|
||||
.map(roadmap => (
|
||||
<RoadmapBlock roadmap={ roadmap } key={ roadmap.url } />
|
||||
)) }
|
||||
</div>
|
||||
</div>
|
||||
</DefaultLayout>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user