Skip to content

Commit

Permalink
chore: remove plausible analytics (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
maaaathis authored Nov 28, 2024
1 parent 336a36a commit 03b6312
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
19 changes: 1 addition & 18 deletions app/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import PlausibleProvider from 'next-plausible';
import { ThemeProvider } from 'next-themes';
import type { FC, ReactElement, ReactNode } from 'react';
import { SWRConfig } from 'swr';
Expand All @@ -9,28 +8,12 @@ type ProvidersProps = {
children: ReactNode;
};

const DiggaPlausibleProvider: FC<ProvidersProps> = ({ children }) => {
if (!process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN) {
return children;
}

return (
<PlausibleProvider
customDomain={process.env.NEXT_PUBLIC_PLAUSIBLE_HOST}
trackOutboundLinks
domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN}
>
{children}
</PlausibleProvider>
);
};

const Providers: FC<ProvidersProps> = ({ children }): ReactElement => (
<ThemeProvider attribute="class">
<SWRConfig
value={{ fetcher: (url) => fetch(url).then((res) => res.json()) }}
>
<DiggaPlausibleProvider>{children}</DiggaPlausibleProvider>
{children}
</SWRConfig>
</ThemeProvider>
);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"lucide-react": "^0.462.0",
"natural-compare-lite": "^1.4.0",
"next": "^15.0.3",
"next-plausible": "^3.12.4",
"next-themes": "^0.4.3",
"postcss": "^8.4.49",
"punycode": "^2.3.1",
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7037,7 +7037,6 @@ __metadata:
lucide-react: "npm:^0.462.0"
natural-compare-lite: "npm:^1.4.0"
next: "npm:^15.0.3"
next-plausible: "npm:^3.12.4"
next-themes: "npm:^0.4.3"
postcss: "npm:^8.4.49"
prettier: "npm:^3.4.1"
Expand Down Expand Up @@ -9517,17 +9516,6 @@ __metadata:
languageName: node
linkType: hard

"next-plausible@npm:^3.12.4":
version: 3.12.4
resolution: "next-plausible@npm:3.12.4"
peerDependencies:
next: "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 "
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
checksum: 10c0/70f1efd90ed5dc63089cd916e630883a62a03ec3319fde0b3a2a2303704a5e60b1843cf9f821e1b918514e3a9d5b0594eb8af6925a01132cb8705219db3bc99a
languageName: node
linkType: hard

"next-themes@npm:^0.4.3":
version: 0.4.3
resolution: "next-themes@npm:0.4.3"
Expand Down

1 comment on commit 03b6312

@vercel
Copy link

@vercel vercel bot commented on 03b6312 Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.