diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx index 0bce17b935..395f0e27b0 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx @@ -1,6 +1,5 @@ "use client"; -import type { FC } from "react"; import { useState } from "react"; import { isEmpty } from "lodash-es"; import Link from "next/link"; diff --git a/apps/admin/core/components/common/banner.tsx b/apps/admin/core/components/common/banner.tsx index dfc0d9ed0a..df0818b34f 100644 --- a/apps/admin/core/components/common/banner.tsx +++ b/apps/admin/core/components/common/banner.tsx @@ -1,4 +1,3 @@ -import type { FC } from "react"; import { AlertCircle, CheckCircle2 } from "lucide-react"; type TBanner = { diff --git a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx b/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx index aae6baf6b3..e9ae670a87 100644 --- a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx +++ b/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx @@ -1,4 +1,3 @@ -import type { FC } from "react"; import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; @@ -62,10 +61,6 @@ export const ExtendedSidebarItem = observer(function ExtendedSidebarItem(props: const handleLinkClick = () => toggleExtendedSidebar(true); - if (!allowPermissions(item.access as any, EUserPermissionsLevel.WORKSPACE, workspaceSlug.toString())) { - return null; - } - const itemHref = item.key === "your_work" ? `/${workspaceSlug.toString()}${item.href}${data?.id}` @@ -151,6 +146,10 @@ export const ExtendedSidebarItem = observer(function ExtendedSidebarItem(props: ); }, [isLastChild, handleOnNavigationItemDrop, disableDrag, disableDrop, item.key]); + if (!allowPermissions(item.access as any, EUserPermissionsLevel.WORKSPACE, workspaceSlug.toString())) { + return null; + } + return (