diff --git a/web/src/components/features/sidebars/SidebarPrimary.tsx b/web/src/components/features/sidebars/SidebarPrimary.tsx
index fcadba0f3..365d8ab6a 100644
--- a/web/src/components/features/sidebars/SidebarPrimary.tsx
+++ b/web/src/components/features/sidebars/SidebarPrimary.tsx
@@ -150,13 +150,16 @@ export const SidebarPrimary = React.memo(() => {
const onCloseSupportModal = useMemoizedFn(() => setOpenSupportModal(false));
+ const HeaderMemoized = useMemo(() => , []);
+ const FooterMemoized = useMemo(() => , []);
+
return (
<>
}
+ header={HeaderMemoized}
activeItem={currentRoute}
- footer={}
+ footer={FooterMemoized}
/>
@@ -166,67 +169,60 @@ export const SidebarPrimary = React.memo(() => {
SidebarPrimary.displayName = 'SidebarPrimary';
-const SidebarPrimaryHeader = React.memo(
- () => {
- const onChangePage = useAppLayoutContextSelector((s) => s.onChangePage);
- useHotkeys('C', () => {
- onChangePage(BusterRoutes.APP_HOME);
- });
+const SidebarPrimaryHeader: React.FC = () => {
+ const onChangePage = useAppLayoutContextSelector((s) => s.onChangePage);
+ useHotkeys('C', () => {
+ onChangePage(BusterRoutes.APP_HOME);
+ });
- return (
-
-
-
-
-
- } variant="ghost" />
-
-
-
-
-
- }
- />
-
-
-
+ return (
+
+
+
+
+
+ } variant="ghost" />
+
+
+
+
+
+ }
+ />
+
+
- );
- },
- () => true
-);
+
+ );
+};
-SidebarPrimaryHeader.displayName = 'SidebarPrimaryHeader';
+const GlobalModals = ({
+ openSupportModal,
+ onCloseSupportModal
+}: {
+ openSupportModal: boolean;
+ onCloseSupportModal: () => void;
+}) => {
+ const onToggleInviteModal = useAppLayoutContextSelector((s) => s.onToggleInviteModal);
+ const openInviteModal = useAppLayoutContextSelector((s) => s.openInviteModal);
+ const onCloseInviteModal = useMemoizedFn(() => onToggleInviteModal(false));
+ const isAnonymousUser = useUserConfigContextSelector((state) => state.isAnonymousUser);
-const GlobalModals = React.memo(
- ({
- openSupportModal,
- onCloseSupportModal
- }: {
- openSupportModal: boolean;
- onCloseSupportModal: () => void;
- }) => {
- const onToggleInviteModal = useAppLayoutContextSelector((s) => s.onToggleInviteModal);
- const openInviteModal = useAppLayoutContextSelector((s) => s.openInviteModal);
- const onCloseInviteModal = useMemoizedFn(() => onToggleInviteModal(false));
- const isAnonymousUser = useUserConfigContextSelector((state) => state.isAnonymousUser);
+ if (isAnonymousUser) return null;
- if (isAnonymousUser) return null;
-
- return (
- <>
-
-
- >
- );
- }
-);
+ return (
+ <>
+
+
+ >
+ );
+};
GlobalModals.displayName = 'GlobalModals';
const favoritesDropdown = (
diff --git a/web/src/components/features/sidebars/SidebarSettings.tsx b/web/src/components/features/sidebars/SidebarSettings.tsx
index 35f525743..c7f1e4c32 100644
--- a/web/src/components/features/sidebars/SidebarSettings.tsx
+++ b/web/src/components/features/sidebars/SidebarSettings.tsx
@@ -74,12 +74,24 @@ export const SidebarSettings: React.FC<{}> = React.memo(({}) => {
return items;
}, [isAdmin]);
+ console.log(currentParentRoute);
+
return (
}
+ header={useMemo(
+ () => (
+
+ ),
+ []
+ )}
activeItem={currentParentRoute}
- footer={}
+ footer={useMemo(
+ () => (
+
+ ),
+ []
+ )}
/>
);
});