Skip to content

Commit

Permalink
fix: remove redirect file (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Sep 11, 2024
1 parent 36adbeb commit b5fdb4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
31 changes: 0 additions & 31 deletions packages/ui/docs-bundle/src/pages/api/fern-docs/redirect.ts

This file was deleted.

5 changes: 2 additions & 3 deletions packages/ui/docs-bundle/src/utils/getDocsPageProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export async function getDocsPageProps(
destination.searchParams.set("state", urlJoin(`https://${xFernHost}`, `/${slug.join("/")}`));
return {
redirect: {
// TODO: this will break if the docs tenant uses basepaths
destination: `/api/fern-docs/redirect?destination=${encodeURIComponent(destination.toString())}`,
destination: destination.toString(),
permanent: false,
},
};
Expand Down Expand Up @@ -129,7 +128,7 @@ export async function getDynamicDocsPageProps(
destination.searchParams.set("state", urlJoin(`https://${xFernHost}`, `/${slug.join("/")}`));
return {
redirect: {
destination: `/api/fern-docs/redirect?destination=${encodeURIComponent(destination.toString())}`,
destination: destination.toString(),
permanent: false,
},
};
Expand Down

0 comments on commit b5fdb4f

Please sign in to comment.