rsnext/examples/with-segment-analytics-pages-router/pages/_app.tsx
Luke Bussey 1aab5ee915
(Example) Update with-segment-analytics to use segmentio/analytics-next and app layout (#52327)
The
[with-segment-analytics](https://github.com/vercel/next.js/blob/canary/examples/with-segment-analytics)
example is out of date so this PR updates it to use
[segmentio/analytics-next](https://github.com/segmentio/analytics-next)
with TypeScript and the app layout.

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2023-08-30 13:04:38 -05:00

16 lines
424 B
TypeScript

import type { AppProps } from 'next/app'
import { Inter } from 'next/font/google'
import Header from '@/components/header'
import Analytics from '@/components/analytics'
const inter = Inter({ subsets: ['latin'] })
export default function MyApp({ Component, pageProps }: AppProps) {
return (
<main className={inter.className}>
<Header />
<Component {...pageProps} />
<Analytics />
</main>
)
}