mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
29 lines
609 B
TypeScript
29 lines
609 B
TypeScript
import React from 'react';
|
|
|
|
import type { NextPageWithLayout } from 'nextjs/types';
|
|
|
|
import PageNextJs from 'nextjs/PageNextJs';
|
|
|
|
import AppError from 'ui/shared/AppError/AppError';
|
|
import LayoutError from 'ui/shared/layout/LayoutError';
|
|
|
|
const error = new Error('Not found', { cause: { status: 404 } });
|
|
|
|
const Page: NextPageWithLayout = () => {
|
|
return (
|
|
<PageNextJs pathname="/404">
|
|
<AppError error={ error }/>
|
|
</PageNextJs>
|
|
);
|
|
};
|
|
|
|
Page.getLayout = function getLayout(page: React.ReactElement) {
|
|
return (
|
|
<LayoutError>
|
|
{ page }
|
|
</LayoutError>
|
|
);
|
|
};
|
|
|
|
export default Page;
|