import { LinksFunction } from '@remix-run/node' import { Link, Links, Meta, Outlet, Scripts, ScrollRestoration, useLocation, useRouteError, } 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
Something went wrong. Please try again later.
} export const links: LinksFunction = () => [{ rel: 'stylesheet', href: stylesheet }] export function Layout({ children }: PropsWithChildren) { return (
{children}
) } function App() { return ( <> ) } export default withSentry(App) function CapturePageView() { const location = useLocation() useEffect(() => { posthog.capture('$pageview') }, [location]) return null }