mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #15376 from overleaf/td-ide-page-working-editor
React IDE page: working editor GitOrigin-RevId: 3ba8cb787a6f7f8435686d8962adb7444d09acb5
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { findInTree } from '@/features/file-tree/util/find-in-tree'
|
||||
import { Folder } from '../../../../../types/folder'
|
||||
import { Doc } from '../../../../../types/doc'
|
||||
|
||||
export function findDocEntityById(fileTreeData: Folder, docId: string) {
|
||||
const item = findInTree(fileTreeData, docId)
|
||||
if (!item || item.type !== 'doc') {
|
||||
return null
|
||||
}
|
||||
return item.entity as Doc
|
||||
}
|
||||
Reference in New Issue
Block a user