Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove plausible analytics #417

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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