import { LinksFunction } from '@remix-run/node' import { Link, Links, Meta, Outlet, Scripts, ScrollRestoration, useLocation, } from '@remix-run/react' import stylesheet from '~/tailwind.css?url' import { PropsWithChildren, useEffect } from 'react' import posthog from 'posthog-js' export const links: LinksFunction = () => [{ rel: 'stylesheet', href: stylesheet }] export function Layout({ children }: PropsWithChildren) { return (
{children}
) } export default function App() { return ( <> ) } function CapturePageView() { const location = useLocation() useEffect(() => { posthog.capture('$pageview') }, [location]) return null }