Skip to content

Commit bee4cf6

Browse files
committed
Fix locale fallback rendering of SDKv4/SDKv3/MethodPromo
The locale route only registered Button and Inline. When a locale falls back to English MDX that uses MethodPromo or SDKv* tabs, the build crashed with "Expected component MethodPromo to be defined". Register the same components as the English route.
1 parent 36b3983 commit bee4cf6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/pages/[locale]/[...slug].astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import ArticleButtons from '../../components/ArticleButtons.astro';
1313
import Button from '../../components/Button.astro';
1414
import Inline from '../../components/Inline.astro';
1515
import MDXImage from '../../components/MDXImage.astro';
16+
import SDKv4 from '../../components/SDKv4.astro';
17+
import SDKv3 from '../../components/SDKv3.astro';
18+
import MethodPromo from '../../components/MethodPromo.astro';
1619
import { CompoundCalculator } from '../../components/CompoundCalculator';
1720
import { SimpleCalculator } from '../../components/SimpleCalculator';
1821
import { SUPPORTED_LOCALES, getBuildLocales } from '../../data/locales';
@@ -187,6 +190,9 @@ Object.entries(localeReusableComponents).forEach(([p, module]: [string, any]) =>
187190
SimpleCalculator,
188191
Button,
189192
Inline,
193+
SDKv4,
194+
SDKv3,
195+
MethodPromo,
190196
Homepage: LocalizedHomepage,
191197
img: MDXImage,
192198
...globalComponents

0 commit comments

Comments
 (0)