refactor: remove archived functionality from notifications and related components

- Removed the archived column from the Notification model and database schema, simplifying the notification structure.
- Deleted ArchiveRequest and ArchiveResponse models, along with associated API endpoints for archiving notifications.
- Updated InboxSidebar and related components to eliminate archiving functionality, streamlining the user experience.
- Adjusted filtering logic in the InboxSidebar to focus solely on unread notifications, enhancing clarity and usability.
This commit is contained in:
Anish Sarkar 2026-01-21 22:47:39 +05:30
parent 8dcdd27d10
commit 112f6ec4cc
8 changed files with 24 additions and 279 deletions

View file

@ -2,7 +2,7 @@
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useAtomValue } from "jotai";
import { Inbox, LogOut, Logs, SquareLibrary, Trash2 } from "lucide-react";
import { Inbox, LogOut, SquareLibrary, Trash2 } from "lucide-react";
import { useParams, usePathname, useRouter } from "next/navigation";
import { useTranslations } from "next-intl";
import { useTheme } from "next-themes";
@ -87,7 +87,7 @@ export function LayoutDataProvider({
// Inbox hook
const userId = user?.id ? String(user.id) : null;
const { inboxItems, unreadCount, loading: inboxLoading, markAsRead, markAllAsRead, archiveItem } = useInbox(
const { inboxItems, unreadCount, loading: inboxLoading, markAsRead, markAllAsRead } = useInbox(
userId,
Number(searchSpaceId) || null,
null
@ -551,7 +551,6 @@ export function LayoutDataProvider({
loading={inboxLoading}
markAsRead={markAsRead}
markAllAsRead={markAllAsRead}
archiveItem={archiveItem}
/>
{/* Create Search Space Dialog */}