diff --git a/plugins/docusaurus/package.json b/plugins/docusaurus/package.json index 32b23ecbc..8ffac5512 100644 --- a/plugins/docusaurus/package.json +++ b/plugins/docusaurus/package.json @@ -1,7 +1,7 @@ { "name": "@codesandbox/sandpack-docusaurus", "private": true, - "version": "0.6.0", + "version": "0.7.1", "description": "", "main": "src/index.js", "publishConfig": { @@ -11,7 +11,7 @@ "build": "echo 1" }, "dependencies": { - "@codesandbox/sandpack-react": "^0.6.0", + "@codesandbox/sandpack-react": "^0.7.1", "@docusaurus/core": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9" }, diff --git a/sandpack-react/src/components/TranspiledCode/index.tsx b/sandpack-react/src/components/TranspiledCode/index.tsx index f28625d5d..4a815ce8e 100644 --- a/sandpack-react/src/components/TranspiledCode/index.tsx +++ b/sandpack-react/src/components/TranspiledCode/index.tsx @@ -5,9 +5,10 @@ import { ErrorOverlay } from "../../common/ErrorOverlay"; import { LoadingOverlay } from "../../common/LoadingOverlay"; import { useSandpack } from "../../hooks/useSandpack"; import { useTranspiledCode } from "../../hooks/useTranspiledCode"; +import type { CodeViewerProps } from "../CodeViewer"; import { SandpackCodeViewer } from "../CodeViewer"; -export const SandpackTranspiledCode: React.FC = () => { +export const SandpackTranspiledCode: React.FC = (props) => { const { sandpack } = useSandpack(); const transpiledCode = useTranspiledCode(); const c = useClasser("sp"); @@ -23,7 +24,9 @@ export const SandpackTranspiledCode: React.FC = () => { return (
- {transpiledCode ? : null} + {transpiledCode && ( + + )}