diff --git a/packages/ui/app/src/App.tsx b/packages/ui/app/src/App.tsx index 40b6fa98e8..dfb19802bb 100644 --- a/packages/ui/app/src/App.tsx +++ b/packages/ui/app/src/App.tsx @@ -37,7 +37,7 @@ export const App: React.FC = ({ docs, resolvedPath }) => { (children, Context) => ( {children} ), - + diff --git a/packages/ui/app/src/docs-context/DocsContext.ts b/packages/ui/app/src/docs-context/DocsContext.ts index 32fdf37ab3..9e52c182c8 100644 --- a/packages/ui/app/src/docs-context/DocsContext.ts +++ b/packages/ui/app/src/docs-context/DocsContext.ts @@ -2,6 +2,7 @@ import { APIV1Read, DocsV1Read, FdrAPI } from "@fern-api/fdr-sdk"; import React from "react"; export const DocsContext = React.createContext({ + domain: "app.buildwithfern.com", // eslint-disable-next-line @typescript-eslint/no-non-null-assertion docsDefinition: undefined!, resolveApi: () => undefined, @@ -10,6 +11,7 @@ export const DocsContext = React.createContext({ }); export interface DocsContextValue { + domain: string; docsDefinition: DocsV1Read.DocsDefinition; resolveApi: (apiId: FdrAPI.ApiDefinitionId) => APIV1Read.ApiDefinition | undefined; diff --git a/packages/ui/app/src/docs-context/DocsContextProvider.tsx b/packages/ui/app/src/docs-context/DocsContextProvider.tsx index d6d833d777..007d930584 100644 --- a/packages/ui/app/src/docs-context/DocsContextProvider.tsx +++ b/packages/ui/app/src/docs-context/DocsContextProvider.tsx @@ -6,10 +6,12 @@ import { DocsContext } from "./DocsContext"; export declare namespace DocsContextProvider { export type Props = PropsWithChildren<{ docsDefinition: DocsV1Read.DocsDefinition; + domain: string; }>; } export const DocsContextProvider: React.FC = ({ + domain, docsDefinition: unmemoizedDocsDefinition, children, }) => { @@ -54,6 +56,7 @@ export const DocsContextProvider: React.FC = ({ return ( = ({ className }) => { - const onClick = useCallback(() => { - window.open("https://buildwithfern.com", "_blank", "noopener noreferrer"); - }, []); - const { isHovering, ...containerCallbacks } = useIsHovering(); + const { domain } = useDocsContext(); + + // TODO: move this to venus + if (domain.toLowerCase().includes("polytomic")) { + return null; + } + return ( -
@@ -33,6 +37,6 @@ export const BuiltWithFern: React.FC = ({ className }) => { > Built with Fern
-
+ ); };