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.
38 lines
1.1 KiB
38 lines
1.1 KiB
import Error from 'next/error'; |
|
import DefaultLayout from 'layouts/default'; |
|
import SiteNav from 'components/site-nav'; |
|
import PageFooter from 'components/page-footer'; |
|
import { serverOnlyProps } from 'lib/server'; |
|
import { getRequestedRoadmap } from 'lib/roadmap'; |
|
import siteConfig from 'content/site'; |
|
import Helmet from 'components/helmet'; |
|
import RoadmapResources from '../../components/roadmap-resources'; |
|
|
|
const Resources = ({ roadmap, canonical }) => { |
|
if (!roadmap) { |
|
return <Error statusCode={404} />; |
|
} |
|
|
|
return ( |
|
<DefaultLayout> |
|
<Helmet |
|
canonical={canonical} |
|
title={roadmap?.seo?.title || roadmap.title} |
|
description={roadmap?.seo?.description || roadmap.description} |
|
keywords={roadmap?.keywords || []} |
|
/> |
|
<SiteNav /> |
|
<RoadmapResources roadmap={roadmap} /> |
|
<PageFooter /> |
|
</DefaultLayout> |
|
); |
|
}; |
|
|
|
Resources.getInitialProps = serverOnlyProps(({ req }) => { |
|
return { |
|
canonical: `${siteConfig.url.web}${req.url}`, |
|
roadmap: getRequestedRoadmap(req) |
|
}; |
|
}); |
|
|
|
export default Resources;
|
|
|