Update dependencies and refactor SentryProvider component

This update includes version bumps for several dependencies across multiple packages and applications including "@sentry/nextjs", "lucide-react", "@types/node", "pnpm", and others. It also includes a change to the SentryProvider component where the SentryMonitoringService is now instantiated outside the MonitoringProvider function instead of using useRef inside the function.
This commit is contained in:
giancarlo
2024-05-31 19:38:56 +07:00
parent 4be66cb3da
commit 88ff32479a
18 changed files with 300 additions and 286 deletions

View File

@@ -1,18 +1,16 @@
import { useRef } from 'react';
import { MonitoringContext } from '@kit/monitoring-core';
import { SentryMonitoringService } from '../services/sentry-monitoring.service';
const sentry = new SentryMonitoringService();
export function SentryProvider({ children }: React.PropsWithChildren) {
return <MonitoringProvider>{children}</MonitoringProvider>;
}
function MonitoringProvider(props: React.PropsWithChildren) {
const service = useRef(new SentryMonitoringService());
return (
<MonitoringContext.Provider value={service.current}>
<MonitoringContext.Provider value={sentry}>
{props.children}
</MonitoringContext.Provider>
);