Files
vf_react/src
zdl 261a7bf329 fix(community): 修复 React Hooks 顺序错误
将 Alert 组件中的 useColorModeValue Hook 调用提取到组件顶层,
避免在条件渲染中调用 Hook 导致的顺序变化问题。

## 问题
- useColorModeValue 在 showNotificationBanner 条件渲染内部调用
- 当条件状态变化时,Hooks 调用顺序发生改变
- 触发 React 警告:Hooks 顺序改变(第 75 个 Hook 从 undefined 变为 useContext)

## 解决方案
- 将 alertBgColor 和 alertBorderColor 提取到组件顶层
- 确保所有 Hooks 在每次渲染时以相同顺序调用
- 符合 React Hooks 规则:只在顶层调用 Hooks

## 变更文件
src/views/Community/index.js:
- 新增 alertBgColor 常量(第 47 行)
- 新增 alertBorderColor 常量(第 48 行)
- Alert 组件使用变量替代直接调用 Hook

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 20:20:57 +08:00
..
2025-10-13 19:04:29 +08:00
2025-11-10 20:05:53 +08:00
2025-11-07 11:20:45 +08:00
2025-10-24 12:54:42 +08:00
2025-11-11 11:45:19 +08:00
2025-11-03 19:45:32 +08:00
2025-11-10 14:48:28 +08:00
2025-11-11 15:51:06 +08:00
2025-11-07 20:05:14 +08:00
2025-11-07 21:46:50 +08:00
2025-10-31 10:33:53 +08:00
2025-10-11 16:16:02 +08:00
2025-11-07 10:56:08 +08:00