From 20ad973441f675e0f13463203052a60bfdc3b2cf Mon Sep 17 00:00:00 2001 From: Thomas Starzynski Date: Tue, 20 Aug 2024 20:30:40 +0200 Subject: [PATCH 1/3] add redirect to /roadmap route --- next.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/next.config.js b/next.config.js index b9160562..615fa428 100644 --- a/next.config.js +++ b/next.config.js @@ -19,6 +19,16 @@ const nextConfig = { // for github pages basePath: process.env.BASE_PATH || "", + + async redirects() { + return [ + { + source: '/roadmap', + destination: 'https://ductus.notion.site/DeXter-Roadmap-e8faed71fe1c4cdf95fb247f682c0d3a', + permanent: false, // Set it to false if you want a 307 temporary redirect, set it to true to make it a 308 permanent redirect. + }, + ]; + }, }; module.exports = withMDX(nextConfig); From edb9e21fc48353e058c92e046fa028a625443a7b Mon Sep 17 00:00:00 2001 From: Thomas Starzynski Date: Tue, 20 Aug 2024 21:29:22 +0200 Subject: [PATCH 2/3] remove server config and add client redirection --- next.config.js | 10 ---------- src/app/roadmap/page.tsx | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/app/roadmap/page.tsx diff --git a/next.config.js b/next.config.js index 615fa428..b9160562 100644 --- a/next.config.js +++ b/next.config.js @@ -19,16 +19,6 @@ const nextConfig = { // for github pages basePath: process.env.BASE_PATH || "", - - async redirects() { - return [ - { - source: '/roadmap', - destination: 'https://ductus.notion.site/DeXter-Roadmap-e8faed71fe1c4cdf95fb247f682c0d3a', - permanent: false, // Set it to false if you want a 307 temporary redirect, set it to true to make it a 308 permanent redirect. - }, - ]; - }, }; module.exports = withMDX(nextConfig); diff --git a/src/app/roadmap/page.tsx b/src/app/roadmap/page.tsx new file mode 100644 index 00000000..9ba4a22d --- /dev/null +++ b/src/app/roadmap/page.tsx @@ -0,0 +1,18 @@ +"use client"; + +import { useEffect } from "react"; +import { useRouter } from 'next/navigation'; + +const Roadmap = () => { + const router = useRouter(); + + useEffect(() => { + router.push( + "https://ductus.notion.site/DeXter-Roadmap-e8faed71fe1c4cdf95fb247f682c0d3a" + ); + }, [router]); + + return null; +}; + +export default Roadmap; From bdbc2d5b5d55315c8f97b782b2040415f885730f Mon Sep 17 00:00:00 2001 From: Thomas Starzynski Date: Tue, 20 Aug 2024 21:30:32 +0200 Subject: [PATCH 3/3] fix linter error --- src/app/roadmap/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/roadmap/page.tsx b/src/app/roadmap/page.tsx index 9ba4a22d..721d5468 100644 --- a/src/app/roadmap/page.tsx +++ b/src/app/roadmap/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useEffect } from "react"; -import { useRouter } from 'next/navigation'; +import { useRouter } from "next/navigation"; const Roadmap = () => { const router = useRouter();