Skip to content

Commit 3ac564c

Browse files
committed
Add finalIframeUriPrefix
1 parent d276ce6 commit 3ac564c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/components/src/OutputTypesDemoPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const createOutput = (
3030
export const OutputTypesDemoPage: React.FC<{ iframeUri: string }> = ({
3131
iframeUri,
3232
}) => {
33+
const finalIframeUriPrefix = iframeUri ?? ".";
34+
3335
// Terminal outputs
3436
const stdoutOutput: OutputData = createOutput("terminal-stdout", "terminal", {
3537
streamName: "stdout",
@@ -313,10 +315,10 @@ def hello():
313315
{section.type === "html" || section.type === "svg" ? (
314316
<div className="border border-dotted border-gray-300">
315317
<pre className="bg-gray-100 p-1 text-xs">
316-
{iframeUri}/react.html
318+
{finalIframeUriPrefix}/react.html
317319
</pre>
318320
<IframeOutput
319-
iframeUri={iframeUri ?? "."}
321+
iframeUri={finalIframeUriPrefix}
320322
outputs={section.outputs}
321323
className="min-h-[200px] w-full"
322324
isReact={true}

0 commit comments

Comments
 (0)