Files
myeasycms-v2/packages/monitoring/api/src/hooks/use-monitoring.ts
2024-09-22 09:45:30 +02:00

15 lines
386 B
TypeScript

'use client';
import { useContext } from 'react';
import { MonitoringContext } from '@kit/monitoring-core';
/**
* @name useMonitoring
* @description Asynchronously load the monitoring service based on the MONITORING_PROVIDER environment variable.
* Use Suspense to suspend while loading the service.
*/
export function useMonitoring() {
return useContext(MonitoringContext);
}