refactor(web): remove typescript
This commit is contained in:
10
packages/web/src/hooks/useNotifications.js
Normal file
10
packages/web/src/hooks/useNotifications.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useQuery } from '@apollo/client';
|
||||
import { GET_NOTIFICATIONS } from 'graphql/queries/get-notifications';
|
||||
export default function useNotifications() {
|
||||
const { data, loading } = useQuery(GET_NOTIFICATIONS);
|
||||
const notifications = data?.getNotifications || [];
|
||||
return {
|
||||
loading,
|
||||
notifications,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user