Files
mai-bot/dashboard/src/routes/config/bot/hooks/ExpressionSectionHook.tsx
DrSmoothl fa15fef1f0 feat(dashboard): convert 4 Sections to Hook components
- Create PersonalitySectionHook (medium complexity)
- Create DebugSectionHook (simple complexity)
- Create ExpressionSectionHook (high complexity)
- Create BotInfoSectionHook (simple complexity)
- Update hooks/index.ts with exports
- Pattern validated across different complexity levels
2026-02-17 18:18:44 +08:00

16 lines
478 B
TypeScript

import type { FieldHookComponent } from '@/lib/field-hooks'
import { ExpressionSection } from '../sections/ExpressionSection'
/**
* ExpressionSection as a Field Hook Component
* This component replaces the entire 'expression' nested config section rendering
*/
export const ExpressionSectionHook: FieldHookComponent = ({ value, onChange }) => {
return (
<ExpressionSection
config={value as any}
onChange={(newConfig) => onChange?.(newConfig)}
/>
)
}