Skip to content

Commit

Permalink
Improve Next.js example (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaslins authored Dec 8, 2023
1 parent 150dbfd commit 6533360
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
7 changes: 4 additions & 3 deletions apps/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';
import { SpeedInsights } from '@vercel/speed-insights/next';
import { SPEED_INSIGHTS_ID } from '../config';

export default function RootLayout({
children,
Expand All @@ -9,8 +8,10 @@ export default function RootLayout({
}): React.ReactNode {
return (
<html lang="en">
<SpeedInsights />
<body>{children}</body>
<body>
{children}
<SpeedInsights />
</body>
</html>
);
}
4 changes: 0 additions & 4 deletions apps/nextjs/config.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/nextjs/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { SpeedInsights } from '@vercel/speed-insights/next';
import type { AppProps } from 'next/app';
import { SPEED_INSIGHTS_ID } from '../config';

export default function MyApp({ Component, pageProps }: AppProps) {
return (
Expand Down

4 comments on commit 6533360

@vercel
Copy link

@vercel vercel bot commented on 6533360 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6533360 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6533360 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6533360 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.