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
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user