diff --git a/site/src/components/stackblitz/content.js b/site/src/components/stackblitz/content.js index cf85fb9986..21ebbe5e95 100644 --- a/site/src/components/stackblitz/content.js +++ b/site/src/components/stackblitz/content.js @@ -1,11 +1,12 @@ import orgPkg from '../../../../package.json'; export const htmlContent = ` -
+ + `; export const mainJsContent = ` - import React from 'react'; + import React, { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import Demo from './demo'; @@ -105,10 +106,13 @@ export const packageJSONContent = JSON.stringify( 'react-dom': orgPkg.devDependencies['react-dom'], 'tdesign-react': orgPkg.version, 'tdesign-icons-react': orgPkg.dependencies['tdesign-icons-react'], + '@types/react': orgPkg.devDependencies['@types/react'], + '@types/react-dom': orgPkg.devDependencies['@types/react-dom'], }, devDependencies: { vite: orgPkg.devDependencies.vite, '@vitejs/plugin-react': orgPkg.devDependencies['@vitejs/plugin-react'], + typescript: orgPkg.devDependencies.typescript, }, }, null, diff --git a/site/src/components/stackblitz/index.jsx b/site/src/components/stackblitz/index.jsx index 13f7ddd724..2a4c118fcb 100644 --- a/site/src/components/stackblitz/index.jsx +++ b/site/src/components/stackblitz/index.jsx @@ -25,7 +25,6 @@ export default function Stackblitz(props) { setIsTypeScriptDemo(isTypeScriptDemo); setTimeout(() => { - console.log(formRef.current, 111); formRef.current.submit(); }); } @@ -35,7 +34,7 @@ export default function Stackblitz(props) {