Skip to content

Commit 733d888

Browse files
committed
feat: 更新App组件结构,添加算法说明区域
1 parent dde32e5 commit 733d888

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useReducer, useState } from 'react'
22
import './App.css'
33
import CanvasComponent from './components/CanvasComponent'
44
import ControlPanel from './components/ControlPanel'
5+
import CodePanel from './components/CodePanel'
56
import { useAnimation } from './hooks/useAnimation'
67
import { animationReducer, AnimationState } from './state/animationSlice'
78
import GitHubCorner from './components/GitHubCorner'
@@ -103,6 +104,14 @@ function App() {
103104
</div>
104105
)}
105106
</div>
107+
108+
{/* 添加代码面板 */}
109+
<div className="code-section">
110+
<h3>算法代码</h3>
111+
<div style={{ height: '280px' }}>
112+
<CodePanel state={state} />
113+
</div>
114+
</div>
106115
</div>
107116

108117
<div className="center-panel">

0 commit comments

Comments
 (0)