Roadmap to becoming a developer in 2022
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.
 
 
 
 
 

22 lines
550 B

import Error from 'next/error';
import Roadmap from '../roadmaps/[roadmap]/index';
import { serverOnlyProps } from '../../lib/server';
import { getRequestedRoadmap } from '../../lib/roadmap';
// Fallback page to handle the old roadmap pages implementation
const OldRoadmap = ({ roadmap }) => {
if (roadmap) {
return <Roadmap roadmap={ roadmap } />
}
return <Error statusCode={ 404 } />;
};
OldRoadmap.getInitialProps = serverOnlyProps(({ req }) => {
return {
roadmap: getRequestedRoadmap(req),
};
});
export default OldRoadmap;