Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
best effort
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeHackett12 committed Apr 9, 2024
1 parent 36b393e commit 49702f5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
9 changes: 4 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const withPlugins = require("next-compose-plugins");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});

module.exports = withPlugins([
[withBundleAnalyzer],
// your other plugins here
]);
module.exports = () => {
const plugins = [withBundleAnalyzer];
return plugins.reduce((acc, next) => next(acc));
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@stitches/react": "^1.2.7",
"framer-motion": "^6.3.10",
"next": "^13.5.0",
"next-compose-plugins": "^2.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-gtm-module": "^2.0.11",
Expand Down
12 changes: 8 additions & 4 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use client';

import { globalCss } from "@obolnetwork/obol-ui";
import type { AppProps } from "next/app";
import TopLeftBg from "../public/backgrounds/top-left-bg.svg";
import { useEffect } from "react";
import { useRouter } from "next/router";
import { useRouter, usePathname } from "next/navigation";

const globalStyles = globalCss({
html: {
Expand All @@ -23,10 +25,12 @@ const globalStyles = globalCss({

function MyApp({ Component, pageProps }: AppProps) {
globalStyles();
const router = useRouter();
useRouter();

const pathname = usePathname()

useEffect(() => {
if (router.pathname !== "/blocked") {
if (pathname !== "/blocked") {
const script = document.createElement("script");
script.src = "https://app.termly.io/embed.min.js";
script.type = "text/javascript";
Expand All @@ -43,7 +47,7 @@ function MyApp({ Component, pageProps }: AppProps) {

document.body.appendChild(script);
}
}, [router.pathname]);
}, [pathname]);

return <Component {...pageProps} />;
}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3052,11 +3052,6 @@ natural-compare@^1.4.0:
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==

next-compose-plugins@^2.2.1:
version "2.2.1"
resolved "https://registry.npmjs.org/next-compose-plugins/-/next-compose-plugins-2.2.1.tgz#020fc53f275a7e719d62521bef4300fbb6fde5ab"
integrity sha512-OjJ+fV15FXO2uQXQagLD4C0abYErBjyjE0I0FHpOEIB8upw0hg1ldFP6cqHTJBH1cZqy96OeR3u1dJ+Ez2D4Bg==

next@^13.5.0:
version "13.5.6"
resolved "https://registry.npmjs.org/next/-/next-13.5.6.tgz#e964b5853272236c37ce0dd2c68302973cf010b1"
Expand Down

0 comments on commit 49702f5

Please sign in to comment.