computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1008 B
40 lines
1008 B
import formatDate from 'date-fns/format' |
|
import { |
|
ActionItems, |
|
AuthorImage, |
|
EditGuide, |
|
GuideAuthor, |
|
GuideDate, |
|
GuideMeta, |
|
GuideSubtitle, |
|
GuideTitle, |
|
HeaderWrap, |
|
} from './style'; |
|
import { getContributionUrl } from "lib/guide"; |
|
import { getTwitterUrl } from "lib/url"; |
|
|
|
const GuideHeader = ({ |
|
guide, |
|
guide: { |
|
author = {} |
|
} = {} |
|
}) => ( |
|
<HeaderWrap className="border-bottom"> |
|
<GuideMeta> |
|
<GuideAuthor href={ getTwitterUrl(author.twitter) } target="_blank"> |
|
<AuthorImage src={ author.picture } /> |
|
{ author.name } |
|
</GuideAuthor> |
|
· |
|
<GuideDate>{ formatDate(new Date(guide.createdAt), 'EEEE, MMMM d yyyy') }</GuideDate> |
|
· |
|
<EditGuide href={ getContributionUrl(guide) } target="_blank">Improve this Guide</EditGuide> |
|
</GuideMeta> |
|
<GuideTitle>{ guide.title }</GuideTitle> |
|
<GuideSubtitle>{ guide.description }</GuideSubtitle> |
|
<ActionItems> |
|
</ActionItems> |
|
</HeaderWrap> |
|
); |
|
|
|
export default GuideHeader;
|
|
|