Yuki Takei пре 3 година
родитељ
комит
8e27e3ab36

+ 2 - 1
apps/app/src/components/CustomNavigation/CustomTabContent.tsx

@@ -24,11 +24,12 @@ const CustomTabContent = (props: Props): JSX.Element => {
       {Object.entries(navTabMapping).map(([key, value]) => {
       {Object.entries(navTabMapping).map(([key, value]) => {
 
 
         const { Content } = value;
         const { Content } = value;
+        const content = Content != null ? <Content /> : <></>;
 
 
         return (
         return (
           <TabPane key={key} tabId={key}>
           <TabPane key={key} tabId={key}>
             <LazyRenderer shouldRender={key === activeTab}>
             <LazyRenderer shouldRender={key === activeTab}>
-              <Content />
+              {content}
             </LazyRenderer>
             </LazyRenderer>
           </TabPane>
           </TabPane>
         );
         );

+ 1 - 1
apps/app/src/components/PageAccessoriesModal.tsx

@@ -130,7 +130,7 @@ const PageAccessoriesModal = (): JSX.Element => {
           activeTab={activeTab}
           activeTab={activeTab}
           navTabMapping={navTabMapping}
           navTabMapping={navTabMapping}
           breakpointToHideInactiveTabsDown="md"
           breakpointToHideInactiveTabsDown="md"
-          onNavSelected={(v) => {
+          onNavSelected={(v: PageAccessoriesModalContents) => {
             setActiveTab(v);
             setActiveTab(v);
           }}
           }}
           hideBorderBottom
           hideBorderBottom

+ 1 - 1
apps/app/src/interfaces/ui.ts

@@ -11,7 +11,7 @@ export type SidebarContentsType = typeof SidebarContentsType[keyof typeof Sideba
 
 
 
 
 export type ICustomTabContent = {
 export type ICustomTabContent = {
-  Content: () => JSX.Element,
+  Content?: () => JSX.Element,
   i18n?: string,
   i18n?: string,
   Icon?: () => JSX.Element,
   Icon?: () => JSX.Element,
   isLinkEnabled?: boolean | ((content: ICustomTabContent) => boolean),
   isLinkEnabled?: boolean | ((content: ICustomTabContent) => boolean),