Skip to content

Commit

Permalink
Merge branch 'main' into home
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght authored Jul 16, 2024
2 parents 2959d7a + 3d365e6 commit ca70259
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import createNextIntlPlugin from 'next-intl/plugin';
import { withPlausibleProxy } from 'next-plausible';

const withNextIntl = createNextIntlPlugin();

Expand Down Expand Up @@ -42,4 +43,4 @@ const nextConfig = {
},
};

export default withNextIntl(nextConfig);
export default withPlausibleProxy()(withNextIntl(nextConfig));
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"lwk_wasm": "^0.7.0",
"next": "^14.2.4",
"next-intl": "^3.15.3",
"next-plausible": "^3.12.0",
"next-qrcode": "^2.5.1",
"next-themes": "^0.3.0",
"nostr-tools": "^2.7.0",
Expand Down
8 changes: 8 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Noto_Sans } from 'next/font/google';
import { cookies } from 'next/headers';
import { NextIntlClientProvider } from 'next-intl';
import { getLocale, getMessages } from 'next-intl/server';
import PlausibleProvider from 'next-plausible';

import { Toaster } from '@/components/ui/toaster';
import { ApolloWrapper } from '@/lib/apollo/wrapper';
Expand All @@ -27,6 +28,8 @@ export default async function RootLayout({
const cookieStore = cookies();

const serverUrl = `${process.env.URL}/api/graphql`;
const enablePlausible = process.env.ENABLE_PLAUSIBLE === 'true';
const plausibleURL = process.env.PLAUSIBLE_DOMAIN || 'mibanco.app';

const accessToken = cookieStore.get('amboss_banco_access_token')?.value;
const refreshToken = cookieStore.get('amboss_banco_refresh_token')?.value;
Expand All @@ -36,6 +39,11 @@ export default async function RootLayout({

return (
<html lang={locale} suppressHydrationWarning>
{enablePlausible ? (
<head>
<PlausibleProvider domain={plausibleURL} />
</head>
) : null}
<body className={font.className}>
<NextIntlClientProvider messages={messages}>
<ThemeProvider
Expand Down

0 comments on commit ca70259

Please sign in to comment.