Skip to content

Commit

Permalink
add plausible
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevcody committed Oct 18, 2024
1 parent 84de184 commit 452cb3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN npm install --silent
COPY . .

ARG NEXT_PUBLIC_CONVEX_URL
ARG NEXT_PUBLIC_ENABLE_PLAUSIBLE

ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production
Expand Down
16 changes: 11 additions & 5 deletions app/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
import { ConvexAuthNextjsProvider } from "@convex-dev/auth/nextjs";
import { ConvexReactClient } from "convex/react";
import { ThemeProvider } from "next-themes";
import PlausibleProvider from "next-plausible";

const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export function Providers({ children }: { children: React.ReactNode }) {
return (
<ThemeProvider attribute="class">
<ConvexAuthNextjsProvider client={convex}>
{children}
</ConvexAuthNextjsProvider>
</ThemeProvider>
<PlausibleProvider
enabled={!!process.env.NEXT_PUBLIC_ENABLE_PLAUSIBLE}
domain="survive-the-night-sim-production.up.railway.app"
>
<ThemeProvider attribute="class">
<ConvexAuthNextjsProvider client={convex}>
{children}
</ConvexAuthNextjsProvider>
</ThemeProvider>
</PlausibleProvider>
);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"date-fns": "^4.1.0",
"lucide-react": "^0.453.0",
"next": "14.2.5",
"next-plausible": "^3.12.2",
"next-themes": "^0.3.0",
"openai": "^4.67.3",
"react": "^18",
Expand Down

0 comments on commit 452cb3d

Please sign in to comment.