Skip to content

Commit

Permalink
feat: 新增404页
Browse files Browse the repository at this point in the history
  • Loading branch information
imzbf committed Nov 13, 2024
1 parent 2295fef commit 52684ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Head from 'next/head';
import Script from 'next/script';
import { ROUTE_PREFIX } from '@/config';

export default function Page() {
return (
<>
<Head>
<meta httpEquiv="refresh" content={`0;url=${ROUTE_PREFIX}`} />
</Head>
<Script id="rt404">{`sessionStorage.redirect = location.href;`}</Script>
</>
);
}

0 comments on commit 52684ab

Please sign in to comment.