Download apps/frontend/src/components/layout/sentry.component.tsx from Leon4gr45/postio: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/apps/frontend/src/components/layout/sentry.component.tsx
- Command line
-
hf download hf://spaces/Leon4gr45/postio/apps/frontend/src/components/layout/sentry.component.tsx
-
curl -L -o sentry.component.tsx https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/apps/frontend/src/components/layout/sentry.component.tsx
562 Bytes
| 'use client'; | |
| import { FC, ReactNode, useEffect } from 'react'; | |
| import { useVariables } from '@gitroom/react/helpers/variable.context'; | |
| import { initializeSentryClient } from '@gitroom/react/sentry/initialize.sentry.client'; | |
| export const SentryComponent: FC<{ children: ReactNode }> = ({ children }) => { | |
| const { sentryDsn: dsn, environment } = useVariables(); | |
| useEffect(() => { | |
| if (!dsn) { | |
| return; | |
| } | |
| initializeSentryClient(environment, dsn); | |
| }, [dsn]); | |
| // Always render children - don't block the app | |
| return <>{children}</>; | |
| }; | |