Skip to content

Commit

Permalink
fix: remove tolt
Browse files Browse the repository at this point in the history
  • Loading branch information
mfts committed Jul 16, 2024
1 parent 0eca487 commit abc3050
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
7 changes: 0 additions & 7 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
3 changes: 1 addition & 2 deletions components/billing/upgrade-plan-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -253,7 +253,6 @@ export function UpgradePlanModal({
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ referral: tolt_referral_id }),
},
)
.then(async (res) => {
Expand Down
10 changes: 1 addition & 9 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
5 changes: 0 additions & 5 deletions pages/api/teams/[teamId]/billing/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}),
});
}

Expand Down

0 comments on commit abc3050

Please sign in to comment.