reduced the components moved (#6110)

This commit is contained in:
Vamsi Krishna
2024-12-02 13:35:40 +05:30
committed by GitHub
parent 63bc01f385
commit 5150c661ab
5 changed files with 15 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
"use client";
// components
import { NotificationsSidebar } from "@/components/workspace-notifications";
import { NotificationsSidebar } from "@/plane-web/components/workspace-notifications";
export default function ProjectInboxIssuesLayout({ children }: { children: React.ReactNode }) {
return (

View File

@@ -0,0 +1 @@
export * from './root'

View File

@@ -1,6 +1,6 @@
"use client";
import { FC } from "react";
import { FC, useCallback } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// components
@@ -14,7 +14,7 @@ import {
NotificationCardListRoot,
} from "@/components/workspace-notifications";
// constants
import { NOTIFICATION_TABS } from "@/constants/notification";
import { NOTIFICATION_TABS, TNotificationTab } from "@/constants/notification";
// helpers
import { cn } from "@/helpers/common.helper";
import { getNumberCount } from "@/helpers/string.helper";
@@ -37,6 +37,15 @@ export const NotificationsSidebar: FC = observer(() => {
const workspace = workspaceSlug ? getWorkspaceBySlug(workspaceSlug.toString()) : undefined;
const notificationIds = workspace ? notificationIdsByWorkspaceId(workspace.id) : undefined;
const handleTabClick = useCallback(
(tabValue: TNotificationTab) => {
if (currentNotificationTab !== tabValue) {
setCurrentNotificationTab(tabValue);
}
},
[currentNotificationTab, setCurrentNotificationTab]
);
if (!workspaceSlug || !workspace) return <></>;
return (
@@ -56,7 +65,7 @@ export const NotificationsSidebar: FC = observer(() => {
<div
key={tab.value}
className="h-full px-3 relative cursor-pointer"
onClick={() => currentNotificationTab != tab.value && setCurrentNotificationTab(tab.value)}
onClick={()=>handleTabClick(tab.value)}
>
<div
className={cn(

View File

@@ -1,8 +1,6 @@
export * from "./loader";
export * from "./empty-state";
export * from "./root";
export * from "./header";
export * from "./filters";

View File

@@ -0,0 +1 @@
export {NotificationsSidebar} from 'ce/components/workspace-notifications'