mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 08:28:03 +08:00
Move SkillEditorProvider from SkillMain to WorkflowAppWrapper so that store state persists across view switches between Graph and Skill views. Also add URL query state for view type using nuqs.
34 lines
866 B
TypeScript
34 lines
866 B
TypeScript
'use client'
|
|
|
|
import type { FC } from 'react'
|
|
import * as React from 'react'
|
|
import EditorArea from './editor-area'
|
|
import EditorBody from './editor-body'
|
|
import EditorTabs from './editor-tabs'
|
|
import Files from './files'
|
|
import Sidebar from './sidebar'
|
|
import SidebarSearchAdd from './sidebar-search-add'
|
|
import SkillDocEditor from './skill-doc-editor'
|
|
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 />
|
|
<Files />
|
|
</Sidebar>
|
|
<EditorArea>
|
|
<EditorTabs />
|
|
<EditorBody>
|
|
<SkillDocEditor />
|
|
</EditorBody>
|
|
</EditorArea>
|
|
</SkillPageLayout>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(SkillMain)
|