From 7c285ff89f0249064970ff8f3b435abf9b7f2b48 Mon Sep 17 00:00:00 2001 From: kiwiyou Date: Thu, 28 Nov 2024 11:55:37 +0900 Subject: [PATCH] fix: uncaught client error --- src/components/interactive-docs/index.tsx | 4 +++- .../(root)/opi/ko/quick-guide/payment/_preview/index.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/interactive-docs/index.tsx b/src/components/interactive-docs/index.tsx index 7e92ea03f..a7897b7d5 100644 --- a/src/components/interactive-docs/index.tsx +++ b/src/components/interactive-docs/index.tsx @@ -1,6 +1,7 @@ export { code } from "./code"; import { Switch } from "@kobalte/core/switch"; import { + children, type Component, createEffect, createMemo, @@ -96,7 +97,8 @@ export function createInteractiveDoc< setPreview(() => preview); }); - return <>{props.children}; + const childrenMemo = children(() => props.children); + return <>{childrenMemo()}; }; const Section = (props: ParentProps<{ section?: Sections }>) => { const { setCurrentSection, currentSection } = useInteractiveDocs(); diff --git a/src/routes/(root)/opi/ko/quick-guide/payment/_preview/index.ts b/src/routes/(root)/opi/ko/quick-guide/payment/_preview/index.ts index 70bc743ea..1f48c6df6 100644 --- a/src/routes/(root)/opi/ko/quick-guide/payment/_preview/index.ts +++ b/src/routes/(root)/opi/ko/quick-guide/payment/_preview/index.ts @@ -16,6 +16,6 @@ export const { Section, InteractiveDoc, Condition, Toggle, preload } = smartRouting: false, pg: { name: "toss", payMethods: "card" }, }, - initialSelectedExample: ["react", "express"], + initialSelectedExample: ["React", "Express"], preview: Preview, });