This commit is contained in:
2025-01-18 14:28:20 +01:00
parent fc1c985d20
commit 291df77669
7 changed files with 15 additions and 52 deletions

View File

@@ -1,7 +1,7 @@
'use client'
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
import clsx from 'clsx'
import {clsx} from 'clsx'
import { ComponentPropsWithoutRef, ReactNode } from 'react'
type TooltipProps = Omit<

View File

@@ -1,52 +1,13 @@
import { startTransition, StrictMode, useEffect } from 'react'
import { hydrateRoot } from 'react-dom/client'
import posthog from 'posthog-js'
import { useLocation, useMatches, RemixBrowser } from '@remix-run/react'
import * as Sentry from '@sentry/remix'
import {startTransition, StrictMode} from 'react'
import {hydrateRoot} from 'react-dom/client'
import {RemixBrowser} from '@remix-run/react'
function PosthogInit() {
useEffect(() => {
posthog.init(import.meta.env.VITE_PH_API_KEY, {
api_host: import.meta.env.VITE_PH_API_HOST,
person_profiles: 'identified_only',
capture_pageview: false,
})
}, [])
return null
}
Sentry.init({
dsn: import.meta.env.VITE_ENV_SENTRY_DSN,
integrations: [
Sentry.browserTracingIntegration({
useEffect,
useLocation,
useMatches,
}),
// Replay is only available in the client
Sentry.replayIntegration(),
],
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
})
startTransition(() => {
hydrateRoot(
document,
<StrictMode>
<RemixBrowser />
<PosthogInit />
</StrictMode>
)
})
})

View File

@@ -31,7 +31,7 @@ export default function Index() {
if (values.length === 0) return null
return (
<Tooltip content={<TooltipContent values={values} />} key={label}>
// <Tooltip content={<TooltipContent values={values} />} key={label}>
<Link
role={'listitem'}
className={'text-sky-500 hover:underline w-max'}
@@ -45,7 +45,7 @@ export default function Index() {
>
{label}
</Link>
</Tooltip>
// </Tooltip>
)
})}
</div>