@@ -58,6 +58,7 @@ export interface AsideNavigationProps {
5858 ydbInternalUser : JSX . Element ;
5959 menuItems ?: MenuItem [ ] ;
6060 content : React . ReactNode ;
61+ renderFooterItems ?: ( defaultFooterItems : React . ReactNode ) => React . ReactNode ;
6162 user ?: { login : string ; icon ?: IconData } ;
6263}
6364
@@ -110,10 +111,11 @@ export function AsideNavigation(props: AsideNavigationProps) {
110111 onChangeCompact = { setIsCompact }
111112 className = { b ( ) }
112113 renderContent = { ( ) => props . content }
113- renderFooter = { ( { compact, asideRef} ) => (
114- < React . Fragment >
114+ renderFooter = { ( { compact : footerCompact , asideRef} ) => {
115+ const defaultFooterItems = [
115116 < FooterItem
116- compact = { compact }
117+ key = "information"
118+ compact = { footerCompact }
117119 item = { {
118120 id : 'information' ,
119121 title : i18n ( 'navigation-item.information' ) ,
@@ -125,9 +127,10 @@ export function AsideNavigation(props: AsideNavigationProps) {
125127 popupVisible = { informationPopupVisible }
126128 onClosePopup = { closeInformationPopup }
127129 renderPopupContent = { renderInformationPopup }
128- />
130+ /> ,
129131
130132 < FooterItem
133+ key = "user-settings"
131134 item = { {
132135 id : 'user-settings' ,
133136 title : i18n ( 'navigation-item.settings' ) ,
@@ -141,14 +144,23 @@ export function AsideNavigation(props: AsideNavigationProps) {
141144 ) ;
142145 } ,
143146 } }
144- compact = { compact }
145- />
146-
147- < UserDropdown isCompact = { compact } popupAnchor = { asideRef } user = { props . user } >
147+ compact = { footerCompact }
148+ /> ,
149+
150+ < UserDropdown
151+ key = "user-dropdown"
152+ isCompact = { footerCompact }
153+ popupAnchor = { asideRef }
154+ user = { props . user }
155+ >
148156 { props . ydbInternalUser }
149- </ UserDropdown >
150- </ React . Fragment >
151- ) }
157+ </ UserDropdown > ,
158+ ] ;
159+
160+ return props . renderFooterItems
161+ ? props . renderFooterItems ( defaultFooterItems )
162+ : defaultFooterItems ;
163+ } }
152164 panelItems = { [
153165 {
154166 id : 'user-settings' ,
0 commit comments