import { apiClient } from "./client"; import { Alert } from "./types"; export async function getAlerts(): Promise { try { console.log("getAlerts: Making API call to /parent/alerts"); const response = await apiClient.get<{ success: boolean; alerts: Alert[]; }>("/parent/alerts"); console.log("getAlerts: API response:", response); return response.alerts; } catch (e) { console.error("Failed to fetch alerts", e); return []; } }