File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import Link from "next/link"
2+
3+ export default function NotFound ( ) {
4+ return (
5+ < div className = "flex min-h-screen flex-col items-center justify-center gap-4 text-center" >
6+ < h1 className = "text-4xl font-bold" > 404</ h1 >
7+ < p className = "text-muted-foreground" > This page could not be found.</ p >
8+ < Link
9+ href = "/introduction"
10+ className = "text-sm underline underline-offset-4 hover:text-foreground"
11+ >
12+ Go to docs
13+ </ Link >
14+ </ div >
15+ )
16+ }
Original file line number Diff line number Diff line change 1- import { redirect } from "next/navigation"
1+ "use client"
2+
3+ import { useEffect } from "react"
4+ import { useRouter } from "next/navigation"
25
36export default function Home ( ) {
4- redirect ( "/introduction" )
7+ const router = useRouter ( )
8+
9+ useEffect ( ( ) => {
10+ router . replace ( "/introduction" )
11+ } , [ router ] )
12+
13+ return null
514}
Original file line number Diff line number Diff line change 1+ import type { MetadataRoute } from "next"
2+
3+ export default function robots ( ) : MetadataRoute . Robots {
4+ return {
5+ rules : {
6+ userAgent : "*" ,
7+ allow : "/" ,
8+ } ,
9+ sitemap : "https://openscan-explorer.github.io/docs/sitemap.xml" ,
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ import type { MetadataRoute } from "next"
2+
3+ const BASE_URL = "https://openscan-explorer.github.io/docs"
4+
5+ const routes = [
6+ "/introduction" ,
7+ "/values" ,
8+ "/explorer" ,
9+ "/explorer/alpha-status" ,
10+ "/explorer/how-it-works" ,
11+ "/explorer/functionalities" ,
12+ "/explorer/settings" ,
13+ "/explorer/super-user" ,
14+ "/network-connectors" ,
15+ "/metadata" ,
16+ "/hardhat-plugin" ,
17+ "/skills" ,
18+ "/tutorials" ,
19+ "/subscriptions" ,
20+ "/contact" ,
21+ ]
22+
23+ export default function sitemap ( ) : MetadataRoute . Sitemap {
24+ return routes . map ( ( route ) => ( {
25+ url : `${ BASE_URL } ${ route } ` ,
26+ lastModified : new Date ( ) ,
27+ } ) )
28+ }
You can’t perform that action at this time.
0 commit comments