File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 1- import { useTreeContext } from '@gouvfr-lasuite/ui-kit' ;
21import { t } from 'i18next' ;
32import React from 'react' ;
43
@@ -20,18 +19,12 @@ interface DocHeaderInfoProps {
2019
2120export const DocHeaderInfo = ( { doc } : DocHeaderInfoProps ) => {
2221 const { isDesktop } = useResponsiveStore ( ) ;
23- const treeContext = useTreeContext < Doc | null > ( ) ;
2422 const { transRole } = useTrans ( ) ;
2523 const { isEditable } = useIsCollaborativeEditable ( doc ) ;
2624 const { relativeDate, calculateDaysLeft } = useDate ( ) ;
2725 const { data : config } = useConfig ( ) ;
2826
29- const countFromTreeContext =
30- treeContext ?. root ?. id === doc . id
31- ? treeContext ?. treeData ?. nodes ?. length
32- : undefined ;
33-
34- const childrenCount = countFromTreeContext ?? doc . numchild ?? 0 ;
27+ const childrenCount = doc . numchild ?? 0 ;
3528
3629 const relativeOnly = relativeDate ( doc . updated_at ) ;
3730
You can’t perform that action at this time.
0 commit comments