diff --git a/apps/demo-fixed-layout-simple/.eslintrc.js b/apps/demo-fixed-layout-simple/.eslintrc.js index 02803479..9f8bd759 100644 --- a/apps/demo-fixed-layout-simple/.eslintrc.js +++ b/apps/demo-fixed-layout-simple/.eslintrc.js @@ -7,4 +7,9 @@ module.exports = defineConfig({ 'no-console': 'off', 'react/prop-types': 'off', }, + settings: { + react: { + version: 'detect', // 自动检测 React 版本 + }, + }, }); diff --git a/apps/demo-fixed-layout-simple/src/components/minimap.tsx b/apps/demo-fixed-layout-simple/src/components/minimap.tsx index 79acc454..14161bf2 100644 --- a/apps/demo-fixed-layout-simple/src/components/minimap.tsx +++ b/apps/demo-fixed-layout-simple/src/components/minimap.tsx @@ -1,7 +1,6 @@ import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/fixed-layout-editor'; - export const Minimap = () => { const minimapService = useService(FlowMinimapService); return ( diff --git a/apps/demo-fixed-layout-simple/src/components/tools.tsx b/apps/demo-fixed-layout-simple/src/components/tools.tsx index dfd6cd76..29e32fe3 100644 --- a/apps/demo-fixed-layout-simple/src/components/tools.tsx +++ b/apps/demo-fixed-layout-simple/src/components/tools.tsx @@ -1,4 +1,5 @@ -import { useEffect, useState } from 'react' +import { useEffect, useState } from 'react'; + import { usePlaygroundTools, useClientContext } from '@flowgram.ai/fixed-layout-editor'; export function Tools() { @@ -15,13 +16,21 @@ export function Tools() { return () => disposable.dispose(); }, [history]); - return