mirror of
https://github.com/langgenius/dify.git
synced 2026-02-13 07:01:23 -05:00
Move searchTerm from props drilling to zustand store for cleaner architecture. Remove unnecessary controlled/uncontrolled pattern and unused debounce logic since search is pure frontend filtering. - Add fileTreeSearchTerm state to file-tree-slice - Remove useState and props from main.tsx - Simplify sidebar-search-add.tsx to read/write store directly - Add empty state UI with reset filter button
34 lines
884 B
TypeScript
34 lines
884 B
TypeScript
'use client'
|
|
|
|
import type { FC } from 'react'
|
|
import * as React from 'react'
|
|
import ContentArea from './content-area'
|
|
import ContentBody from './content-body'
|
|
import FileContentPanel from './file-content-panel'
|
|
import FileTabs from './file-tabs'
|
|
import FileTree from './file-tree'
|
|
import Sidebar from './sidebar'
|
|
import SidebarSearchAdd from './sidebar-search-add'
|
|
import SkillPageLayout from './skill-page-layout'
|
|
|
|
const SkillMain: FC = () => {
|
|
return (
|
|
<div className="h-full bg-workflow-canvas-workflow-top-bar-1 pl-3 pt-[52px]">
|
|
<SkillPageLayout>
|
|
<Sidebar>
|
|
<SidebarSearchAdd />
|
|
<FileTree />
|
|
</Sidebar>
|
|
<ContentArea>
|
|
<FileTabs />
|
|
<ContentBody>
|
|
<FileContentPanel />
|
|
</ContentBody>
|
|
</ContentArea>
|
|
</SkillPageLayout>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(SkillMain)
|