Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions app/routes/query.$version.docs.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/'))
Expand Down
2 changes: 1 addition & 1 deletion app/routes/query.$version.docs.framework.$framework.$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Comment thread
lachlancollins marked this conversation as resolved.
redirectPath: url.replace(`/framework/${framework}`, ''),
})
}

Expand Down