Files
Messenger/web/src/api/notifications.ts
benya f1b2e47df8 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
2026-03-08 02:54:16 +03:00

15 lines
362 B
TypeScript

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;
}