Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: remove tolt

Marc Seitzabc3050ceb92
diff --git a/app/layout.tsx b/app/layout.tsx
index aebd91bd..7e49d8d0 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -50,13 +50,6 @@ export default function RootLayout({
return (
<html lang="en">
<head>
- {process.env.NEXT_PUBLIC_TOLT_REFERRAL_ID && (
- <script
- async
- src="https://cdn.tolt.io/tolt.js"
- data-tolt={process.env.NEXT_PUBLIC_TOLT_REFERRAL_ID}
- />
- )}
<PlausibleProvider
domain="papermark.io"
enabled={process.env.NEXT_PUBLIC_VERCEL_ENV === "production"}
diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx
index f2256e50..0720cbc1 100644
--- a/components/billing/upgrade-plan-modal.tsx
+++ b/components/billing/upgrade-plan-modal.tsx
@@ -237,7 +237,7 @@ export function UpgradePlanModal({
setClicked(true);
// @ts-ignore
// prettier-ignore
- const tolt_referral_id: string | undefined = window.tolt_referral;
+
fetch(
`/api/teams/${
teamInfo?.currentTeam?.id
@@ -253,7 +253,6 @@ export function UpgradePlanModal({
headers: {
"Content-Type": "application/json",
},
- body: JSON.stringify({ referral: tolt_referral_id }),
},
)
.then(async (res) => {
diff --git a/pages/_document.tsx b/pages/_document.tsx
index c2b08770..47faab55 100644
--- a/pages/_document.tsx
+++ b/pages/_document.tsx
@@ -3,15 +3,7 @@ import { Head, Html, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en" className="h-full bg-background" suppressHydrationWarning>
- <Head>
- {process.env.NEXT_PUBLIC_TOLT_REFERRAL_ID && (
- <script
- async
- src="https://cdn.tolt.io/tolt.js"
- data-tolt={process.env.NEXT_PUBLIC_TOLT_REFERRAL_ID}
- />
- )}
- </Head>
+ <Head />
<body className="h-full">
<Main />
<NextScript />
diff --git a/pages/api/teams/[teamId]/billing/upgrade.ts b/pages/api/teams/[teamId]/billing/upgrade.ts
index 6eafc57a..9df33d97 100644
--- a/pages/api/teams/[teamId]/billing/upgrade.ts
+++ b/pages/api/teams/[teamId]/billing/upgrade.ts
@@ -83,11 +83,6 @@ export default async function handle(
mode: "subscription",
allow_promotion_codes: true,
client_reference_id: teamId,
- ...(req.body.referral && {
- metadata: {
- tolt_referral: req.body.referral,
- },
- }),
});
}