| 123456789101112131415 |
- import { GetServerSidePropsContext } from "next/types";
- export default function errorProps(
- context: GetServerSidePropsContext,
- code = 404,
- otherProps: Docs = {}
- ) {
- context.res.statusCode = code;
- return {
- props: {
- statusCode: code,
- ...otherProps,
- },
- };
- }
|