refactor: fetch notifications over graphql query

This commit is contained in:
Ali BARIN
2023-08-28 20:44:55 +00:00
parent 4d4091adcc
commit df24bac913
13 changed files with 71 additions and 33 deletions

View File

@@ -0,0 +1,15 @@
import axios from '../../helpers/axios-with-proxy';
const NOTIFICATIONS_URL = 'https://notifications.automatisch.io/notifications.json';
const getNotifications = async () => {
try {
const { data: notifications = [] } = await axios.get(NOTIFICATIONS_URL);
return notifications;
} catch (err) {
return [];
}
};
export default getNotifications;