diff --git a/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx b/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx index dfa939ce35..98dcb033b5 100644 --- a/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx +++ b/web/core/components/workspace/sidebar/favorites/favorite-items/common/favorite-item-title.tsx @@ -6,7 +6,6 @@ import { useAppTheme } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; type Props = { - projectId: string | null; href: string; title: string; icon: JSX.Element; @@ -14,7 +13,7 @@ type Props = { }; export const FavoriteItemTitle: FC = observer((props) => { - const { projectId, href, title, icon, isSidebarCollapsed } = props; + const { href, title, icon, isSidebarCollapsed } = props; // store hooks const { toggleSidebar } = useAppTheme(); const { isMobile } = usePlatformOS(); @@ -24,10 +23,6 @@ export const FavoriteItemTitle: FC = observer((props) => { "group/project-item cursor-pointer relative group w-full flex items-center justify-center gap-1.5 rounded px-2 py-1 outline-none text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-90 active:bg-custom-sidebar-background-90 truncate p-0 size-8 aspect-square mx-auto"; const handleOnClick = () => { - if (projectId) { - const projectItem = document.getElementById(`${projectId}`); - projectItem?.scrollIntoView({ behavior: "smooth" }); - } if (isMobile) toggleSidebar(); }; diff --git a/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx b/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx index 84f66c0a71..5d880e3a6c 100644 --- a/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx +++ b/web/core/components/workspace/sidebar/favorites/favorite-items/root.tsx @@ -91,13 +91,7 @@ export const FavoriteRoot: FC = observer((props) => { <> {!sidebarCollapsed && } - + {!sidebarCollapsed && ( = observer((props) => { useEffect(() => { if (URLProjectId === project.id) setIsProjectListOpen(true); - else setIsProjectListOpen(false); }, [URLProjectId]); const handleItemClick = () => {