diff --git a/package.json b/package.json index 6c7245f..f95e60c 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "mongodb": "^3.6.9", "next": "^12.2.5", "next-auth": "^4.14.0", + "next-plausible": "^3.6.3", "next-pwa": "^5.6.0", "nodemailer": "^6.7.2", "nprogress": "^0.2.0", diff --git a/pages/_app.js b/pages/_app.js index a979f3c..bbe1dc3 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -5,6 +5,7 @@ import {createTheme, ThemeProvider} from '@mui/material/styles' import CssBaseline from '@mui/material/CssBaseline' import {SessionProvider, useSession} from 'next-auth/react' import {CacheProvider} from '@emotion/react' +import PlausibleProvider from 'next-plausible' import {grey, green, red} from '@mui/material/colors' import NProgress from 'nprogress' import createEmotionCache from '../lib/create-emotion-cache' @@ -101,21 +102,23 @@ export default function MyApp(props) { }, []) return ( - - - - - - - {Component.auth ? ( - - ) : ( - - )} - - - - + + + + + + + + {Component.auth ? ( + + ) : ( + + )} + + + + + ) } diff --git a/yarn.lock b/yarn.lock index a4430cf..814faa6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6219,6 +6219,11 @@ next-auth@^4.14.0: preact-render-to-string "^5.1.19" uuid "^8.3.2" +next-plausible@^3.6.3: + version "3.6.3" + resolved "https://registry.yarnpkg.com/next-plausible/-/next-plausible-3.6.3.tgz#964e711e015a0fc03ad772123d1a1e48c86900bd" + integrity sha512-KlpB0k/PPMq0udKOLgTcp6RAqGLiIi7956tXRD5w/gzzgVdp2i3xvnafG60Exjiz98go1Jj98n/PxD3WitKH6Q== + next-pwa@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/next-pwa/-/next-pwa-5.6.0.tgz#f7b1960c4fdd7be4253eb9b41b612ac773392bf4"