diff --git a/app/routes/query.$version.docs.$.tsx b/app/routes/query.$version.docs.$.tsx index 6e3afbca..d6175b10 100644 --- a/app/routes/query.$version.docs.$.tsx +++ b/app/routes/query.$version.docs.$.tsx @@ -10,17 +10,6 @@ export const loader = async (context: LoaderFunctionArgs) => { const { '*': docsPath, version } = context.params const { url } = context.request - const reactReferencePages = '/docs/react/reference' - const vueReferencePages = '/docs/vue/reference' - - if (url.includes(reactReferencePages)) { - throw redirect(url.replace(reactReferencePages, '/docs/reference')) - } - - if (url.includes(vueReferencePages)) { - throw redirect(url.replace(vueReferencePages, '/docs/reference')) - } - // Temporary fix for old docs structure if (url.includes('/docs/react/')) { throw redirect(url.replace('/docs/react/', '/docs/framework/react/')) diff --git a/app/routes/query.$version.docs.framework.$framework.$.tsx b/app/routes/query.$version.docs.framework.$framework.$.tsx index 648a7b91..718f1874 100644 --- a/app/routes/query.$version.docs.framework.$framework.$.tsx +++ b/app/routes/query.$version.docs.framework.$framework.$.tsx @@ -15,7 +15,7 @@ export const loader = async (context: LoaderFunctionArgs) => { branch: getBranch(version), docPath: `docs/framework/${framework}/${docsPath}`, currentPath: url, - redirectPath: url.replace(/\/docs.*/, '/docs/framework/react/overview'), + redirectPath: url.replace(`/framework/${framework}`, ''), }) }