diff --git a/apps/nextjs/app/layout.tsx b/apps/nextjs/app/layout.tsx
index 1a45dea..4d61fe2 100644
--- a/apps/nextjs/app/layout.tsx
+++ b/apps/nextjs/app/layout.tsx
@@ -5,10 +5,10 @@ export default function RootLayout({
children,
}: {
children: React.ReactNode;
-}) {
+}): React.ReactNode {
return (
-
+
{children}
);
diff --git a/apps/nextjs/pages/_app.tsx b/apps/nextjs/pages/_app.tsx
index 8cbaa5a..db8dd8a 100644
--- a/apps/nextjs/pages/_app.tsx
+++ b/apps/nextjs/pages/_app.tsx
@@ -5,7 +5,7 @@ export default function MyApp({ Component, pageProps }: AppProps) {
return (
<>
-
+
>
);
}
diff --git a/packages/web/src/generic/index.ts b/packages/web/src/generic/index.ts
index db56730..3e7a533 100644
--- a/packages/web/src/generic/index.ts
+++ b/packages/web/src/generic/index.ts
@@ -21,10 +21,9 @@ export function sendVitals(metrics: CollectedMetric[], dsn: string): void {
speed,
id: metric.id,
event_name: metric.name,
- ...(metric.dynamicPath && { dynamicPath: metric.dynamicPath }),
value,
href: window.location.href.replace('http://', 'https://'), // TODO: remove this
- //...metric,
+ ...(metric.dynamicPath && { dynamicPath: metric.dynamicPath }),
};
sendBeacon(vital);
diff --git a/packages/web/src/nextjs/index.tsx b/packages/web/src/nextjs/index.tsx
index 3baa052..20877f2 100644
--- a/packages/web/src/nextjs/index.tsx
+++ b/packages/web/src/nextjs/index.tsx
@@ -5,7 +5,7 @@ import type { CollectedMetric } from '../types';
import { useDynamicPath } from './utils';
interface SpeedInsightsProps {
- token?: string;
+ token: string;
sampleRate?: number; // Only send a percentage of events to the server to reduce costs
}
@@ -22,7 +22,7 @@ export function SpeedInsights({ token, sampleRate }: SpeedInsightsProps): null {
// eslint-disable-next-line no-console -- ok for now
console.log('flushing', body);
- sendVitals(body, token ?? 'wAkFEOQVq9CTI5O4445EXoD5w1Y');
+ sendVitals(body, token);
vitals.current = [];
}