fix: wrong places and wrong strategies
This commit is contained in:
parent
24a6e5d568
commit
9258f93846
@ -1,5 +1,7 @@
|
||||
import "../styles/globals.css";
|
||||
|
||||
import Script from "next/script";
|
||||
|
||||
import { Fragment } from "react";
|
||||
|
||||
import Navbar from "../components/Navbar";
|
||||
@ -13,7 +15,9 @@ const Content = ({ children }) => (
|
||||
</div>
|
||||
);
|
||||
|
||||
const App = ({ Component, pageProps }) => (
|
||||
const App = ({ Component, pageProps }) => {
|
||||
console.log(process.env.UMAMI_ENABLED);
|
||||
return (
|
||||
<Fragment>
|
||||
<Navbar name={config.navbar.logotype} logo={config.navbar.logo} />
|
||||
<Content>
|
||||
@ -25,7 +29,15 @@ const App = ({ Component, pageProps }) => (
|
||||
license={config.footer.license}
|
||||
commitID={process.env.COMMIT_SHORT_SHA || "HEAD"}
|
||||
/>
|
||||
{process.env.UMAMI_ENABLED ? (
|
||||
<Script
|
||||
strategy="beforeInteractive"
|
||||
src={process.env.UMAMI_SCRIPT_URL}
|
||||
data-website-id={process.env.UMAMI_WEBSITE_ID}
|
||||
/>
|
||||
) : null}
|
||||
</Fragment>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
|
@ -1,5 +1,3 @@
|
||||
import Script from "next/script";
|
||||
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
|
||||
const Document = () => {
|
||||
@ -9,12 +7,6 @@ const Document = () => {
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
{process.env.UMAMI_ENABLED === "true" ? (
|
||||
<Script
|
||||
src={process.env.UMAMI_SCRIPT_URL}
|
||||
data-website-id={process.env.UMAMI_WEBSITE_ID}
|
||||
/>
|
||||
) : null}
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user