mirror of
https://github.com/makeplane/plane.git
synced 2026-07-11 21:10:13 +02:00
refactor: remove unused sidebar components and update import paths in workspace notifications
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
// components
|
||||
import { SidebarChart } from "./sidebar-chart";
|
||||
|
||||
type Props = {
|
||||
workspaceSlug: string;
|
||||
projectId: string;
|
||||
cycleId: string;
|
||||
};
|
||||
|
||||
export function SidebarChartRoot(props: Props) {
|
||||
return <SidebarChart {...props} />;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
import { NotificationCardListRoot } from "./notification-card/root";
|
||||
|
||||
export type TNotificationListRoot = {
|
||||
workspaceSlug: string;
|
||||
workspaceId: string;
|
||||
};
|
||||
|
||||
export function NotificationListRoot(props: TNotificationListRoot) {
|
||||
return <NotificationCardListRoot {...props} />;
|
||||
}
|
||||
@@ -18,13 +18,12 @@ import { CountChip } from "@/components/common/count-chip";
|
||||
// hooks
|
||||
import { useWorkspaceNotifications } from "@/hooks/store/notifications";
|
||||
import { useWorkspace } from "@/hooks/store/use-workspace";
|
||||
// plane web components
|
||||
import { NotificationListRoot } from "@/components/workspace-notifications/list-root";
|
||||
// local imports
|
||||
import { NotificationEmptyState } from "./empty-state";
|
||||
import { AppliedFilters } from "./filters/applied-filter";
|
||||
import { NotificationSidebarHeader } from "./header";
|
||||
import { NotificationsLoader } from "./loader";
|
||||
import { NotificationCardListRoot } from "../notification-card/root";
|
||||
|
||||
export const NotificationsSidebarRoot = observer(function NotificationsSidebarRoot() {
|
||||
const { workspaceSlug } = useParams();
|
||||
@@ -108,7 +107,7 @@ export const NotificationsSidebarRoot = observer(function NotificationsSidebarRo
|
||||
<>
|
||||
{notificationIds && notificationIds.length > 0 ? (
|
||||
<ContentWrapper variant={ERowVariant.HUGGING}>
|
||||
<NotificationListRoot workspaceSlug={workspaceSlug.toString()} workspaceId={workspace?.id} />
|
||||
<NotificationCardListRoot workspaceSlug={workspaceSlug.toString()} workspaceId={workspace?.id} />
|
||||
</ContentWrapper>
|
||||
) : (
|
||||
<div className="relative flex h-full w-full items-center justify-center">
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
import type { IWorkspaceSidebarNavigationItem } from "@plane/constants";
|
||||
import { SidebarItemBase } from "@/components/workspace/sidebar/sidebar-item";
|
||||
|
||||
type Props = {
|
||||
item: IWorkspaceSidebarNavigationItem;
|
||||
};
|
||||
|
||||
export function SidebarItem({ item }: Props) {
|
||||
return <SidebarItemBase item={item} />;
|
||||
}
|
||||
@@ -27,8 +27,7 @@ import {
|
||||
usePersonalNavigationPreferences,
|
||||
useWorkspaceNavigationPreferences,
|
||||
} from "@/hooks/use-navigation-preferences";
|
||||
// plane-web imports
|
||||
import { SidebarItem } from "@/components/workspace/sidebar/sidebar-item-wrapper";
|
||||
import { SidebarItemBase } from "./sidebar-item";
|
||||
|
||||
export const SidebarMenuItems = observer(function SidebarMenuItems() {
|
||||
// routers
|
||||
@@ -100,7 +99,7 @@ export const SidebarMenuItems = observer(function SidebarMenuItems() {
|
||||
<div className="flex flex-col gap-0.5">
|
||||
{filteredStaticNavigationItems.map((item, _index) => (
|
||||
// oxlint-disable-next-line react/no-array-index-key
|
||||
<SidebarItem key={`static_${_index}`} item={item} />
|
||||
<SidebarItemBase key={`static_${_index}`} item={item} />
|
||||
))}
|
||||
</div>
|
||||
<Disclosure as="div" className="flex flex-col" defaultOpen={!!isWorkspaceMenuOpen}>
|
||||
@@ -152,11 +151,11 @@ export const SidebarMenuItems = observer(function SidebarMenuItems() {
|
||||
<>
|
||||
{WORKSPACE_SIDEBAR_STATIC_PINNED_NAVIGATION_ITEMS_LINKS.map((item, _index) => (
|
||||
// oxlint-disable-next-line react/no-array-index-key
|
||||
<SidebarItem key={`static_${_index}`} item={item} />
|
||||
<SidebarItemBase key={`static_${_index}`} item={item} />
|
||||
))}
|
||||
{sortedNavigationItems.map((item, _index) => (
|
||||
// oxlint-disable-next-line react/no-array-index-key
|
||||
<SidebarItem key={`dynamic_${_index}`} item={item} />
|
||||
<SidebarItemBase key={`dynamic_${_index}`} item={item} />
|
||||
))}
|
||||
<SidebarNavItem>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user