diff --git a/.changeset/deep-spoons-throw.md b/.changeset/deep-spoons-throw.md new file mode 100644 index 000000000..2f24834a1 --- /dev/null +++ b/.changeset/deep-spoons-throw.md @@ -0,0 +1,5 @@ +--- +'@gitbook/integration-arcade': minor +--- + +Add query param for language diff --git a/integrations/arcade/src/arcade.ts b/integrations/arcade/src/arcade.ts index 95750a056..37d37a00e 100644 --- a/integrations/arcade/src/arcade.ts +++ b/integrations/arcade/src/arcade.ts @@ -30,10 +30,11 @@ export async function fetchArcadeOEmbedData(flowId: string): Promise; const embedBlock = createComponent<{ flowId?: string; url?: string; + language?: string; }>({ componentId: 'embed', @@ -41,7 +42,7 @@ const embedBlock = createComponent<{ async render(element, context) { const { environment } = context; - const { flowId, url } = element.props; + const { flowId, url, language } = element.props; if (!flowId) { return ( @@ -69,11 +70,12 @@ const embedBlock = createComponent<{ const embedData = await fetchArcadeOEmbedData(flowId); const aspectRatio = embedData.width / embedData.height; + const embedUrl = `https://demo.arcade.software/${flowId}?embed${language ? `&language=${encodeURIComponent(language)}` : ''}`; return (