diff --git a/packages/docs/package.json b/packages/docs/package.json index eb505d41e..3cf82e369 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -3,7 +3,7 @@ "version": "1.13.0", "private": true, "scripts": { - "build": "npm run create-templates && docusaurus build", + "build": "npm run build-templates && docusaurus build", "clear": "docusaurus clear", "start": "concurrently \"docusaurus start\" \"npm run start-esm-server\"", "start-esm-server": "node web-server/index.mjs", diff --git a/packages/docs/src/components/ui/codeRunner.tsx b/packages/docs/src/components/ui/codeRunner.tsx index 0b9626b0d..0fdef75ec 100644 --- a/packages/docs/src/components/ui/codeRunner.tsx +++ b/packages/docs/src/components/ui/codeRunner.tsx @@ -5,15 +5,11 @@ import BrowserOnly from '@docusaurus/BrowserOnly'; const BASE_SANDBOX_URL = 'https://codesandbox.io/s/github/mathuo/dockview/tree/master/packages/docs'; -export const _CodeRunner = (props: { - id: string; - framework: string; - height: number; -}) => { - useActiveFramework(); +export const _CodeRunner = (props: { id: string; height: number }) => { + const [framework] = useActiveFramework(); - const sandboxUrl = `${BASE_SANDBOX_URL}/templates/${props.id}/${props.framework}`; - const path = `/templates/${props.id}/${props.framework}/index.html`; + const sandboxUrl = `${BASE_SANDBOX_URL}/templates/${props.id}/${framework}`; + const path = `/templates/${props.id}/${framework}/index.html`; return (