MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / fetchAlerts

Function fetchAlerts

web/src/components/organization/billing-alerts.tsx:47–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 }, [organizationId])
46
47 const fetchAlerts = async () => {
48 try {
49 const response = await fetch(`/api/orgs/${organizationId}/alerts`)
50
51 if (response.ok) {
52 const data = await response.json()
53 setAlerts(data.alerts || [])
54 }
55 } catch (error) {
56 console.error('Error fetching billing alerts:', error)
57 } finally {
58 setLoading(false)
59 }
60 }
61
62 const dismissAlert = async (alertId: string) => {
63 try {

Callers 1

BillingAlertsFunction · 0.85

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected