-
{header}
-
- {content.map((item) => (
-
- ))}
-
+export const Sidebar: React.FC
= React.memo(({ header, content, footer }) => {
+ return (
+
+
+
{header}
+
+ {content.map((item) => (
+
+ ))}
- {footer &&
{footer}
}
- );
- }
-);
+ {footer &&
{footer}
}
+
+ );
+});
Sidebar.displayName = 'Sidebar';
const ContentSelector: React.FC<{
content: SidebarProps['content'][number];
- activeItem: SidebarProps['activeItem'];
-}> = React.memo(({ content, activeItem }) => {
+}> = React.memo(({ content }) => {
if (isSidebarGroup(content)) {
- return ;
+ return ;
}
- return ;
+ return ;
});
ContentSelector.displayName = 'ContentSelector';
const SidebarList: React.FC<{
items: ISidebarList['items'];
- activeItem: SidebarProps['activeItem'];
-}> = ({ items, activeItem }) => {
+}> = ({ items }) => {
return (
{items.map((item) => (
-
+
))}
);
diff --git a/web/src/components/ui/sidebar/interfaces.ts b/web/src/components/ui/sidebar/interfaces.ts
index 9fc096aae..4c7c18748 100644
--- a/web/src/components/ui/sidebar/interfaces.ts
+++ b/web/src/components/ui/sidebar/interfaces.ts
@@ -33,6 +33,5 @@ export interface SidebarProps {
header: React.ReactNode;
content: SidebarContent[];
footer?: React.ReactNode;
- activeItem: string;
isSortable?: boolean;
}