diff --git a/packages/ui/app/src/api-page/endpoints/EndpointContent.tsx b/packages/ui/app/src/api-page/endpoints/EndpointContent.tsx index b2b380c80c..79ef5eb5b9 100644 --- a/packages/ui/app/src/api-page/endpoints/EndpointContent.tsx +++ b/packages/ui/app/src/api-page/endpoints/EndpointContent.tsx @@ -2,12 +2,12 @@ import * as FernRegistryApiRead from "@fern-fern/registry-browser/api/resources/ import { getEndpointTitleAsString, getSubpackageTitle, isSubpackage } from "@fern-ui/app-utils"; import useSize from "@react-hook/size"; import classNames from "classnames"; +import dynamic from "next/dynamic"; import React, { useCallback, useMemo, useRef, useState } from "react"; import { useApiDefinitionContext } from "../../api-context/useApiDefinitionContext"; import { ApiPageDescription } from "../ApiPageDescription"; import { JsonPropertyPath } from "../examples/json-example/contexts/JsonPropertyPath"; import { useEndpointContext } from "./endpoint-context/useEndpointContext"; -import { EndpointExample } from "./endpoint-examples/EndpointExample"; import { EndpointAvailabilityTag } from "./EndpointAvailabilityTag"; import { EndpointErrorsSection } from "./EndpointErrorsSection"; import { EndpointRequestSection } from "./EndpointRequestSection"; @@ -19,6 +19,11 @@ import { QueryParametersSection } from "./QueryParametersSection"; const URL_OVERFLOW_THRESHOLD = 0.95; +const EndpointExample = dynamic({ + ssr: false, + loader: () => import("./endpoint-examples/EndpointExample").then((mod) => mod.EndpointExample), +}); + export declare namespace EndpointContent { export interface Props { endpoint: FernRegistryApiRead.EndpointDefinition;