refactor(api): changes to call a helper api to quit and redirect if needed

This commit is contained in:
2026-05-13 20:52:55 -05:00
parent e9e73c829c
commit c64392f457
4 changed files with 13 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
import { keepPreviousData, queryOptions } from "@tanstack/react-query";
import axios from "axios";
import { api } from "../apiHelper";
export function notifications() {
return queryOptions({
@@ -16,7 +17,7 @@ const fetch = async () => {
await new Promise((res) => setTimeout(res, 1500));
}
const { data } = await axios.get("/lst/api/notification");
const { data } = await api.get("/notification");
return data.data;
};