@@ -4,7 +4,6 @@ import { ImageZoom, type ImageZoomProps } from "fumadocs-ui/components/image-zoo
44import { Step , Steps } from "fumadocs-ui/components/steps" ;
55import { Tab , Tabs } from "fumadocs-ui/components/tabs" ;
66import { TypeTable } from "fumadocs-ui/components/type-table" ;
7- import Image , { type ImageProps } from "next/image" ;
87import { notFound } from "next/navigation" ;
98import { HTMLAttributes } from "react" ;
109
@@ -27,8 +26,23 @@ const defaultMdxComponents = {
2726 Tab,
2827 Tabs,
2928 TypeTable,
30- ImageNoZoom : ( props : ImageProps ) => < Image { ...props } /> ,
31- img : ( props : ImageZoomProps ) => < ImageZoom { ...props } /> ,
29+ img : ( props : ImageZoomProps ) => {
30+ // Don't apply ImageZoom to images inside Card components
31+ // This prevents the unwanted zoom behavior on partner logos and other card images
32+ if (
33+ props . className ?. includes ( "object-contain" ) ||
34+ props . alt ?. includes ( "Network" ) ||
35+ props . alt ?. includes ( "Protocol" ) ||
36+ props . alt ?. includes ( "Terminal" ) ||
37+ props . alt ?. includes ( "Lit" ) ||
38+ props . alt ?. includes ( "Rhinestone" ) ||
39+ props . alt ?. includes ( "Lilypad" )
40+ ) {
41+ // eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text
42+ return < img { ...( props as any ) } /> ;
43+ }
44+ return < ImageZoom { ...props } /> ;
45+ } ,
3246 Card : ( props : CardProps ) => < Card { ...props } /> ,
3347 Cards : ( props : HTMLAttributes < HTMLDivElement > ) => < Cards { ...props } /> ,
3448 Callout : ( props : CalloutProps ) => < Callout { ...props } /> ,
@@ -40,15 +54,9 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
4054 if ( ! page ) notFound ( ) ;
4155
4256 const MDX = page . data . body ;
43- // Don't show the TOC or edit button on the root page, or the auto-generated API reference pages
57+ // Don't show the TOC or edit button on the root page
4458 const isRootPage = ! params . slug || params . slug . length === 0 ;
45- const isApiReferencePage = params . slug ?. [ 0 ] === "api-reference" ;
46- // Ignore the `api-reference/endpoints` page since it's manually written, so we want the TOC
47- const isApiReferenceRootPage =
48- params . slug ?. length === 2 &&
49- params . slug ?. [ 0 ] === "api-reference" &&
50- params . slug ?. [ 1 ] === "endpoints" ;
51- const isApiPage = isApiReferencePage && ! isApiReferenceRootPage ;
59+ const isApiPage = params . slug ?. [ 0 ] === "reference" ;
5260 const githubPath = `docs/${ page . file . path } ` ;
5361 const githubInfo = {
5462 repo : "docs" ,
0 commit comments