refactor: rewrite useNotifications with RQ

This commit is contained in:
kasia.oczkowska
2024-03-21 09:59:51 +00:00
committed by kattoczko
parent b68aff76a1
commit d808afd21b
9 changed files with 22 additions and 52 deletions

View File

@@ -1,16 +0,0 @@
import axios from '../../helpers/axios-with-proxy.js';
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;