@@ -27,15 +27,17 @@ export function BaseNavigationTabs({
2727} : BaseNavigationTabsProps ) {
2828 const { registeredTabs, registerTab, unregisterTab } = useTabRegistration ( ) ;
2929
30+ const staticPaths = React . useMemo ( ( ) => new Set ( tabs . map ( t => t . path ) ) , [ tabs ] ) ;
31+
3032 const contextValue = React . useMemo (
31- ( ) => ( { activeValue, buildHref, registerTab, unregisterTab } ) ,
32- [ activeValue , buildHref , registerTab , unregisterTab ]
33+ ( ) => ( { activeValue, buildHref, registerTab, staticPaths , unregisterTab } ) ,
34+ [ activeValue , buildHref , registerTab , staticPaths , unregisterTab ]
3335 ) ;
3436
35- const allTabs = React . useMemo ( ( ) => {
36- const staticPaths = new Set ( tabs . map ( t => t . path ) ) ;
37- return [ ... tabs , ... registeredTabs . filter ( t => ! staticPaths . has ( t . path ) ) ] ;
38- } , [ tabs , registeredTabs ] ) ;
37+ const allTabs = React . useMemo (
38+ ( ) => [ ... tabs , ... registeredTabs . filter ( t => ! staticPaths . has ( t . path ) ) ] ,
39+ [ tabs , registeredTabs , staticPaths ]
40+ ) ;
3941
4042 return (
4143 < NavigationTabsContext . Provider value = { contextValue } >
0 commit comments