quivr/frontend/lib/api/notification/useNotificationApi.ts
Mamadou DICKO 7cc90ef258
feat: add polling for pending notifications (#1152)
* feat: add notification controller

* feat: add polling logic on pending notifications

* feat: refecth notifications on Feed
2023-09-12 18:00:46 +02:00

14 lines
386 B
TypeScript

import { useAxios } from "@/lib/hooks";
import { getChatNotifications } from "./notification";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useNotificationApi = () => {
const { axiosInstance } = useAxios();
return {
getChatNotifications: async (chatId: string) =>
await getChatNotifications(chatId, axiosInstance),
};
};