Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/app/[workspaceSlug]/(projects)/notifications/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"use client";

// components
import { NotificationsSidebar } from "@/plane-web/components/workspace-notifications";
import { NotificationsSidebarRoot } from "@/plane-web/components/workspace-notifications";

export default function ProjectInboxIssuesLayout({ children }: { children: React.ReactNode }) {
return (
<div className="relative w-full h-full overflow-hidden flex items-center">
<NotificationsSidebar />
<NotificationsSidebarRoot />
<div className="w-full h-full overflow-hidden overflow-y-auto">{children}</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions web/ce/components/workspace-notifications/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { getNumberCount } from "@/helpers/string.helper";
// hooks
import { useWorkspace, useWorkspaceNotifications } from "@/hooks/store";

export const NotificationsSidebar: FC = observer(() => {
export const NotificationsSidebarRoot: FC = observer(() => {
const { workspaceSlug } = useParams();
// hooks
const { getWorkspaceBySlug } = useWorkspace();
Expand Down Expand Up @@ -65,7 +65,7 @@ export const NotificationsSidebar: FC = observer(() => {
<div
key={tab.value}
className="h-full px-3 relative cursor-pointer"
onClick={()=>handleTabClick(tab.value)}
onClick={() => handleTabClick(tab.value)}
>
<div
className={cn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { getDate } from "@/helpers/date-time.helper";
type TNotificationSnoozeModal = {
isOpen: boolean;
onClose: () => void;
onSubmit: (dateTime?: Date | undefined) => Promise<TNotification | undefined>;
onSubmit: (dateTime?: Date | undefined) => Promise<void>;
};

type FormValues = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,23 @@ export const NotificationItemSnoozeOption: FC<TNotificationItemSnoozeOption> = o
const handleNotificationSnoozeDate = async (snoozeTill: Date | undefined) => {
if (snoozeTill) {
try {
const response = await snoozeNotification(workspaceSlug, snoozeTill);
await snoozeNotification(workspaceSlug, snoozeTill);
setToast({
title: "Success!",
message: "Notification snoozed successfully",
type: TOAST_TYPE.SUCCESS,
});
return response;
} catch (e) {
console.error(e);
}
} else {
try {
const response = await unSnoozeNotification(workspaceSlug);
await unSnoozeNotification(workspaceSlug);
setToast({
title: "Success!",
message: "Notification un snoozed successfully",
type: TOAST_TYPE.SUCCESS,
});
return response;
} catch (e) {
console.error(e);
}
Expand Down
4 changes: 2 additions & 2 deletions web/core/store/notifications/workspace-notifications.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface IWorkspaceNotificationStore {

export class WorkspaceNotificationStore implements IWorkspaceNotificationStore {
// constants
paginatedCount = 30;
paginatedCount = 300;
// observables
loader: TNotificationLoader = undefined;
unreadNotificationsCount: TUnreadNotificationsCount = {
Expand All @@ -84,7 +84,7 @@ export class WorkspaceNotificationStore implements IWorkspaceNotificationStore {
read: false,
};

constructor(private store: CoreRootStore) {
constructor(protected store: CoreRootStore) {
makeObservable(this, {
// observables
loader: observable.ref,
Expand Down
1 change: 1 addition & 0 deletions web/ee/components/workspace-notifications/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "ce/components/workspace-notifications";
1 change: 0 additions & 1 deletion web/ee/components/workspace-notifications/root.tsx

This file was deleted.

Loading