feat(notifications): add in-app notification center panel

- add notifications API client
- add notifications modal in chat page header
- show recent notification events with timestamps and count badge
This commit is contained in:
2026-03-08 02:54:16 +03:00
parent d74e2c08c1
commit f1b2e47df8
2 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { http } from "./http";
export interface NotificationItem {
id: number;
user_id: number;
event_type: string;
payload: string;
created_at: string;
}
export async function getNotifications(limit = 30): Promise<NotificationItem[]> {
const { data } = await http.get<NotificationItem[]>("/notifications", { params: { limit } });
return data;
}