File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ export const staticRoutes = [
129129 "/reading" ,
130130 "/roadmap" ,
131131 "/settings" ,
132+ "/sitemap" ,
132133 "/stories" ,
133134 "/stories/authors" ,
134135 "/stories/characters" ,
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ const NotebookViewerPage = lazy(
239239const CommandsPage = lazy ( ( ) => import ( '../pages/CommandsPage' ) ) ;
240240const AchievementsPage = lazy ( ( ) => import ( '../pages/AchievementsPage' ) ) ;
241241const VocabPage = lazy ( ( ) => import ( '../pages/VocabPage' ) ) ;
242+ const SitemapPage = lazy ( ( ) => import ( '../pages/SitemapPage' ) ) ;
242243const WelcomePage = lazy ( ( ) => import ( '../pages/WelcomePage' ) ) ;
243244const DashboardPage = lazy ( ( ) => import ( '../pages/DashboardPage' ) ) ;
244245const KnowledgeGraphPage = lazy ( ( ) => import ( '../pages/KnowledgeGraphPage' ) ) ;
@@ -869,6 +870,22 @@ const AnimatedRoutes = ({
869870 </ motion . div >
870871 }
871872 />
873+ < Route
874+ path = "/sitemap"
875+ element = {
876+ < motion . div
877+ initial = "initial"
878+ animate = "in"
879+ exit = "out"
880+ variants = { pageVariants }
881+ transition = { pageTransition }
882+ >
883+ < Suspense fallback = { < Loading /> } >
884+ < SitemapPage />
885+ </ Suspense >
886+ </ motion . div >
887+ }
888+ />
872889 < Route
873890 path = "/welcome"
874891 element = {
Original file line number Diff line number Diff line change 1+ import React , { useEffect } from 'react' ;
2+
3+ const SitemapPage = ( ) => {
4+ useEffect ( ( ) => {
5+ // Delay the navigation so Puppeteer's prerender snapshot completes first.
6+ // The cleanup cancels the timer when the page is closed (during prerender),
7+ // so the redirect only fires for real visitors.
8+ const t = setTimeout ( ( ) => {
9+ window . location . href = '/sitemap.xml' ;
10+ } , 1500 ) ;
11+ return ( ) => clearTimeout ( t ) ;
12+ } , [ ] ) ;
13+
14+ return (
15+ < div className = "p-10 text-center text-white text-xl" >
16+ < h1 >
17+ Redirecting to{ ' ' }
18+ < a href = "/sitemap.xml" className = "underline" >
19+ sitemap.xml
20+ </ a >
21+ ...
22+ </ h1 >
23+ </ div >
24+ ) ;
25+ } ;
26+
27+ export default SitemapPage ;
You can’t perform that action at this time.
0 commit comments