From c36ae6ca55a6a14b0532688f7b6f06cd76202c1a Mon Sep 17 00:00:00 2001 From: Simek Date: Wed, 3 Sep 2025 10:16:08 +0200 Subject: [PATCH 1/4] add Releases page redirect --- website/static/_redirects | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/static/_redirects b/website/static/_redirects index cd366db3423..fbf122ce596 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -116,5 +116,8 @@ https://reactnative.dev/docs/0.74/ram-bundles-inline-requires /docs/o # Rework of the community /help /community/overview +# Releases +/docs/next/releases /releases + # Latest version might be linked to directly and should redirect /docs/$LATEST_VERSION$/* /docs/:splat From e99ee29a536599b64a08181d0bde15c11a6eb2e8 Mon Sep 17 00:00:00 2001 From: Simek Date: Wed, 3 Sep 2025 10:21:52 +0200 Subject: [PATCH 2/4] update redirects definitions --- website/static/_redirects | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/website/static/_redirects b/website/static/_redirects index fbf122ce596..59836b3ecfb 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -14,7 +14,8 @@ /contributing/how-to-contribute /contributing/overview /contributing/how-to-file-an-issue /contributing/how-to-report-a-bug -/releases/release-candidate-minor /releases/release-branch-cut-and-rc0 + +/releases /docs/next/releases # Redirect New Architecture docs of all versions # Note: We had to delete the older versions to get redirects to work @@ -116,8 +117,5 @@ https://reactnative.dev/docs/0.74/ram-bundles-inline-requires /docs/o # Rework of the community /help /community/overview -# Releases -/docs/next/releases /releases - # Latest version might be linked to directly and should redirect /docs/$LATEST_VERSION$/* /docs/:splat From 6f363880e394b552b63e3e3407e29692b84439ca Mon Sep 17 00:00:00 2001 From: Simek Date: Wed, 3 Sep 2025 11:00:19 +0200 Subject: [PATCH 3/4] use in code redirect --- website/src/pages/releases.tsx | 12 ++++++++++++ website/static/_redirects | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 website/src/pages/releases.tsx diff --git a/website/src/pages/releases.tsx b/website/src/pages/releases.tsx new file mode 100644 index 00000000000..1c6fd838356 --- /dev/null +++ b/website/src/pages/releases.tsx @@ -0,0 +1,12 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const Releases = () => { + location.href = '/docs/next/releases'; +}; + +export default Releases; diff --git a/website/static/_redirects b/website/static/_redirects index 59836b3ecfb..0c640aeee5d 100644 --- a/website/static/_redirects +++ b/website/static/_redirects @@ -15,8 +15,6 @@ /contributing/how-to-contribute /contributing/overview /contributing/how-to-file-an-issue /contributing/how-to-report-a-bug -/releases /docs/next/releases - # Redirect New Architecture docs of all versions # Note: We had to delete the older versions to get redirects to work /docs/the-new-architecture/why /architecture/landing-page From a907390d651598c63d4eec098b2799465bcce103 Mon Sep 17 00:00:00 2001 From: Simek Date: Wed, 3 Sep 2025 11:15:43 +0200 Subject: [PATCH 4/4] client side redirect attempt --- website/src/pages/releases.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/website/src/pages/releases.tsx b/website/src/pages/releases.tsx index 1c6fd838356..b0ad09a9eb0 100644 --- a/website/src/pages/releases.tsx +++ b/website/src/pages/releases.tsx @@ -4,9 +4,19 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ +import Layout from '@theme/Layout'; +import React, {useEffect} from 'react'; const Releases = () => { - location.href = '/docs/next/releases'; + useEffect(() => { + location.href = '/docs/next/releases'; + }, []); + + return ( + +
Redirecting...
+
+ ); }; export default Releases;