import * as React from 'react' ; import { useDrilldownManager } from '../context' ; export const DrilldownManagerTitle = ( { children } ) => { const drilldowns = useDrilldownManager ( ) ; React . useEffect ( ( ) => { drilldowns . setTitle ( children ) ; return ( ) => { drilldowns . resetTitle ( ) ; } ; } ) ; return null ; } ; export const RenderDrilldownManagerTitle = ( ) => { const drilldowns = useDrilldownManager ( ) ; const title = drilldowns . useTitle ( ) ; return < > { title } < />; } ;