Skip to content

Commit

Permalink
fix: setup speed insights correctly (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Jan 23, 2024
1 parent c419c36 commit c18caed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/ui/app/src/next-app/NextApp.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "@fortawesome/fontawesome-svg-core/styles.css";
import { SpeedInsights } from "@vercel/speed-insights/next";
import type { AppProps } from "next/app";
import { ReactElement } from "react";
import { ThemeProvider } from "../docs/ThemeProvider";
Expand All @@ -11,8 +12,11 @@ setupFontAwesomeIcons();
export function NextApp({ Component, pageProps }: AppProps<Partial<DocsPage.Props>>): ReactElement {
const theme = pageProps.docs?.definition.config.colorsV3.type;
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
<>
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
<SpeedInsights />
</>
);
}
2 changes: 0 additions & 2 deletions packages/ui/app/src/next-app/NextDocument.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { SpeedInsights } from "@vercel/speed-insights/next";
import { Head, Html, Main, NextScript } from "next/document";
import { ReactElement } from "react";

Expand All @@ -9,7 +8,6 @@ export function NextDocument(): ReactElement {
<body className="antialiased">
<Main />
<NextScript />
<SpeedInsights />
</body>
</Html>
);
Expand Down

0 comments on commit c18caed

Please sign in to comment.