From 99e5bce275821b2b2ac8de24cf68aa795597687c Mon Sep 17 00:00:00 2001 From: Karan Suresh Date: Fri, 7 Nov 2025 11:09:41 +0530 Subject: [PATCH 1/4] fix: fixing the redirection to /docs Refactor NotFound component to use window.location.replace for immediate redirect. Signed-off-by: Karan Suresh --- src/theme/NotFound/Content/index.js | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index a20b1a706..46f1d920a 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,22 +1,13 @@ -import React, {useEffect} from "react"; -import {PageMetadata} from "@docusaurus/theme-common"; +import { useEffect } from "react"; -export default function Index() { +export default function NotFound() { useEffect(() => { - window.location.href = "/docs/"; - }, 2000); - []; + if (typeof window !== "undefined") { + // immediate redirect without adding to browser history + window.location.replace("/docs"); + } + }, []); - return ( - <> - -
-
-
-

Redirecting to home page...

-
-
-
- - ); + // render nothing (no content shown) + return null; } From b3cf9078aca138b31d340f53b10167fa763c30ef Mon Sep 17 00:00:00 2001 From: Karan Suresh Date: Fri, 7 Nov 2025 12:40:16 +0530 Subject: [PATCH 2/4] fix: immediately redirect to /docs Signed-off-by: Karan Suresh --- src/theme/NotFound/Content/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 46f1d920a..7414dc0cf 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import {useEffect} from "react"; export default function NotFound() { useEffect(() => { From 4f36b7dcea69c5e3fc98b5ad2000916e29f63a56 Mon Sep 17 00:00:00 2001 From: Karan Suresh Date: Fri, 7 Nov 2025 11:09:41 +0530 Subject: [PATCH 3/4] fix: fixing the redirection to /docs Refactor NotFound component to use window.location.replace for immediate redirect. Signed-off-by: Karan Suresh --- src/theme/NotFound/Content/index.js | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index a20b1a706..46f1d920a 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,22 +1,13 @@ -import React, {useEffect} from "react"; -import {PageMetadata} from "@docusaurus/theme-common"; +import { useEffect } from "react"; -export default function Index() { +export default function NotFound() { useEffect(() => { - window.location.href = "/docs/"; - }, 2000); - []; + if (typeof window !== "undefined") { + // immediate redirect without adding to browser history + window.location.replace("/docs"); + } + }, []); - return ( - <> - -
-
-
-

Redirecting to home page...

-
-
-
- - ); + // render nothing (no content shown) + return null; } From 3ea91deecfdf064979f38decd95d0db7ac4798dd Mon Sep 17 00:00:00 2001 From: Karan Suresh Date: Fri, 7 Nov 2025 12:40:16 +0530 Subject: [PATCH 4/4] fix: immediately redirect to /docs Signed-off-by: Karan Suresh --- src/theme/NotFound/Content/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/NotFound/Content/index.js b/src/theme/NotFound/Content/index.js index 46f1d920a..7414dc0cf 100644 --- a/src/theme/NotFound/Content/index.js +++ b/src/theme/NotFound/Content/index.js @@ -1,4 +1,4 @@ -import { useEffect } from "react"; +import {useEffect} from "react"; export default function NotFound() { useEffect(() => {