Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Oct 8, 2024
1 parent dcb6c6d commit bc0a6e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/ui/docs-bundle/src/server/getDocsPageProps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { FernUser } from "@fern-ui/fern-docs-auth";
import type { DocsPage } from "@fern-ui/ui";
import type { GetServerSidePropsResult } from "next";
import type { NextApiRequestCookies } from "next/dist/server/api-utils";
import type { ComponentProps } from "react";
import { LoadDocsPerformanceTracker } from "./LoadDocsPerformanceTracker";
import type { AuthProps } from "./authProps";
Expand All @@ -19,7 +18,6 @@ export async function getDocsPageProps(
xFernHost: string | undefined,
slug: string[],
auth?: AuthProps,
cookies?: NextApiRequestCookies,
): Promise<SSGDocsPageProps> {
if (xFernHost == null || Array.isArray(xFernHost)) {
return { notFound: true };
Expand All @@ -35,9 +33,7 @@ export async function getDocsPageProps(
/**
* Convert the docs into initial props for the page.
*/
const initialProps = await performance.trackInitialPropsPromise(
withInitialProps({ docs, slug, xFernHost, auth, cookies }),
);
const initialProps = await performance.trackInitialPropsPromise(withInitialProps({ docs, slug, xFernHost, auth }));

/**
* Send performance data to Vercel Analytics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export async function getDynamicDocsPageProps(
* would have redirected them to the login page
*/
const authProps = await withAuthProps(xFernHost, cookies[COOKIE_FERN_TOKEN]);
return getDocsPageProps(xFernHost, slug, authProps, cookies);
return getDocsPageProps(xFernHost, slug, authProps);
}

0 comments on commit bc0a6e6

Please sign in to comment.