mirror of
https://github.com/ershisan99/vacancies-trends-front.git
synced 2026-02-02 21:02:07 +00:00
fix?
This commit is contained in:
16
app/root.tsx
16
app/root.tsx
@@ -11,13 +11,10 @@ import {
|
||||
} from '@remix-run/react'
|
||||
import stylesheet from '~/tailwind.css?url'
|
||||
import { PropsWithChildren, useEffect } from 'react'
|
||||
import posthog from 'posthog-js'
|
||||
import { captureRemixErrorBoundaryError, withSentry } from '@sentry/remix'
|
||||
|
||||
export const ErrorBoundary = () => {
|
||||
const error = useRouteError()
|
||||
|
||||
captureRemixErrorBoundaryError(error)
|
||||
|
||||
return <div>Something went wrong. Please try again later.</div>
|
||||
}
|
||||
@@ -54,19 +51,8 @@ export function Layout({ children }: PropsWithChildren) {
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<>
|
||||
<CapturePageView />
|
||||
<Outlet />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default withSentry(App)
|
||||
|
||||
function CapturePageView() {
|
||||
const location = useLocation()
|
||||
useEffect(() => {
|
||||
posthog.capture('$pageview')
|
||||
}, [location])
|
||||
return null
|
||||
}
|
||||
export default App
|
||||
|
||||
Reference in New Issue
Block a user