mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 16:19:43 +01:00
reduced the components moved (#6110)
This commit is contained in:
@@ -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 (
|
||||
|
||||
1
web/ce/components/workspace-notifications/index.ts
Normal file
1
web/ce/components/workspace-notifications/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './root'
|
||||
@@ -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(
|
||||
@@ -1,8 +1,6 @@
|
||||
export * from "./loader";
|
||||
export * from "./empty-state";
|
||||
|
||||
export * from "./root";
|
||||
|
||||
export * from "./header";
|
||||
|
||||
export * from "./filters";
|
||||
|
||||
1
web/ee/components/workspace-notifications/root.tsx
Normal file
1
web/ee/components/workspace-notifications/root.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export {NotificationsSidebar} from 'ce/components/workspace-notifications'
|
||||
Reference in New Issue
Block a user