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.

32 lines
835 B

import Error from "next/error";
import GuideLayout from 'layouts/guide';
import { serverOnlyProps } from 'lib/server';
import GuideHeader from 'components/guide-header';
import GuideBody from 'components/guide-body';
import GuideFooter from 'components/guide-footer';
import { getRequestedGuide } from 'lib/guide';
import Helmet from 'components/helmet';
5 years ago
const Guide = ({ guide }) => {
if (!guide) {
return <Error statusCode={ 404 } />
}
5 years ago
return (
<GuideLayout>
<Helmet title={ guide.title } description={ guide.description } />
<GuideHeader guide={ guide } />
<GuideBody guide={ guide } />
<GuideFooter guide={ guide } />
5 years ago
</GuideLayout>
);
};
Guide.getInitialProps = serverOnlyProps(async ({ req }) => {
5 years ago
return {
guide: await getRequestedGuide(req),
5 years ago
};
});
export default Guide;