@@ -15,16 +15,7 @@ import {
15
15
import { getResourcesFromPaths } from '../../../state/helpers/resources-helpers' ;
16
16
import { useAppDispatch , useAppSelector } from '../../../state/hooks' ;
17
17
import {
18
- getAttributionBreakpoints ,
19
18
getExpandedIds ,
20
- getExternalData ,
21
- getFilesWithChildren ,
22
- getManualAttributions ,
23
- getResolvedExternalAttributions ,
24
- getResourcesToExternalAttributions ,
25
- getResourcesToManualAttributions ,
26
- getResourcesWithExternalAttributedChildren ,
27
- getResourcesWithManualAttributedChildren ,
28
19
getSelectedResourceId ,
29
20
} from '../../../state/selectors/resource-selectors' ;
30
21
import { useFilteredAttributions } from '../../../state/variables/use-filtered-data' ;
@@ -40,29 +31,10 @@ export const ResourcesTree = ({ resourceIds, sx }: Props) => {
40
31
const dispatch = useAppDispatch ( ) ;
41
32
const selectedResourceId = useAppSelector ( getSelectedResourceId ) ;
42
33
const expandedIds = useAppSelector ( getExpandedIds ) ;
43
- const manualAttributions = useAppSelector ( getManualAttributions ) ;
44
- const resourcesToManualAttributions = useAppSelector (
45
- getResourcesToManualAttributions ,
46
- ) ;
47
- const resourcesWithManualAttributedChildren = useAppSelector (
48
- getResourcesWithManualAttributedChildren ,
49
- ) ;
50
- const resourcesToExternalAttributions = useAppSelector (
51
- getResourcesToExternalAttributions ,
52
- ) ;
53
- const resourcesWithExternalAttributedChildren = useAppSelector (
54
- getResourcesWithExternalAttributedChildren ,
55
- ) ;
56
- const resolvedExternalAttributions = useAppSelector (
57
- getResolvedExternalAttributions ,
58
- ) ;
59
- const attributionBreakpoints = useAppSelector ( getAttributionBreakpoints ) ;
60
- const filesWithChildren = useAppSelector ( getFilesWithChildren ) ;
61
- const externalData = useAppSelector ( getExternalData ) ;
62
34
63
35
const [ _ , setFilteredAttributions ] = useFilteredAttributions ( ) ;
64
36
65
- const nodes = useMemo (
37
+ const resources = useMemo (
66
38
( ) => getResourcesFromPaths ( resourceIds ) ,
67
39
[ resourceIds ] ,
68
40
) ;
@@ -96,29 +68,9 @@ export const ResourcesTree = ({ resourceIds, sx }: Props) => {
96
68
dispatch ( setSelectedResourceIdOrOpenUnsavedPopup ( nodeId ) ) ;
97
69
} }
98
70
onToggle = { handleToggle }
99
- nodes = { nodes }
71
+ resources = { resources }
100
72
selectedNodeId = { selectedResourceId }
101
- getTreeNodeLabel = { ( resourceName , resource , nodeId ) => (
102
- < ResourcesTreeNodeLabel
103
- resourceName = { resourceName }
104
- resource = { resource }
105
- nodeId = { nodeId }
106
- resourcesToManualAttributions = { resourcesToManualAttributions }
107
- resourcesToExternalAttributions = { resourcesToExternalAttributions }
108
- manualAttributions = { manualAttributions }
109
- resourcesWithExternalAttributedChildren = {
110
- resourcesWithExternalAttributedChildren
111
- }
112
- resourcesWithManualAttributedChildren = {
113
- resourcesWithManualAttributedChildren
114
- }
115
- resolvedExternalAttributions = { resolvedExternalAttributions }
116
- attributionBreakpoints = { attributionBreakpoints }
117
- filesWithChildren = { filesWithChildren }
118
- externalData = { externalData }
119
- />
120
- ) }
121
- breakpoints = { attributionBreakpoints }
73
+ TreeNodeLabel = { ResourcesTreeNodeLabel }
122
74
sx = { sx }
123
75
testId = { 'resources-tree' }
124
76
/>
0 commit comments