mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 05:06:15 +08:00
refactor: remove redundant skill file sync ref guard
This commit is contained in:
@ -35,12 +35,10 @@ const SkillMain = () => {
|
||||
const appId = appDetail?.id || ''
|
||||
const [queryFileId] = useQueryState('fileId', parseAsString)
|
||||
const storeApi = useWorkflowStore()
|
||||
const openedFileRef = React.useRef<string | null>(null)
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!queryFileId || openedFileRef.current === queryFileId)
|
||||
if (!queryFileId)
|
||||
return
|
||||
openedFileRef.current = queryFileId
|
||||
storeApi.getState().openTab(queryFileId, { pinned: true })
|
||||
}, [queryFileId, storeApi])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user