1aab5ee915
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>
16 lines
424 B
TypeScript
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>
|
|
)
|
|
}
|